| Simple reasoning about the calendar and appointments, in a single time zone there is a time block starting some-start1 and ending some-fin1 there is a time block starting some-start2 and ending some-fin2 that-start1 is less than that-fin2 that-start2 is less than that-fin1 --------------------------------------------------------------------------------------------- the time block that-start1 to that-fin1 overlaps with the time block that-start2 to that-fin2 on some-year some-month some-day some-day-name from some-start1 to some-fin1 is scheduled for some-item the time block some-start to some-fin overlaps with the time block that-start1 to that-fin1 ------------------------------------------------------------------------------------------------------------------ on that-year that-month that-day that-day-name there is a scheduled item that overlaps with that-start to that-fin some-day-of-month is a possible day of a month day number some-day-number in some-year is the that-day-of-month day of month some-month there is a time block starting some-time1 and ending some-time2 in that-year day number that-day-number is some-day-name add : on that-year that-month that-day-of-month that-day-name from that-time1 to that-time2 is scheduled for some-item -------------------------------------------------------------------------------------------------------------------- schedule that-item for that-year that-month that-day-of-month that-day-name from that-time1 to that-time2 there is a half hour time block starting some-time1 and ending some-time there is a half hour time block starting that-time and ending some-time2 that-time1 is less than that-time2 --------------------------------------------------------------- there is a time block starting that-time1 and ending that-time2 on this-year this-month this-day this-day-name from this-start1 to this-fin1 is scheduled for this-item ============================================================================================================================== 2004 1 1 Thursday 700 800 Business Meeting 2004 3 11 Thursday 900 1000 Finance Review some-year is a year under consideration not : that-year is divisible by 4 some-mo-number some-month normally has some-number days -------------------------------------------------------------- in the year that-year month that-mo-number has that-number days some-year is a year under consideration that-year is divisible by 4 ------------------------------------------ in the year that-year month 2 has 29 days some-year is a year under consideration that-year is divisible by 4 some-mo-number some-month normally has some-number days not : that-month is equal February --------------------------------------------------------------- in the year that-year month that-mo-number has that-number days some-year is a year under consideration that-year is divisible by 4 ------------------------------------------ the year that-year has altogether 366 days some-year is a year under consideration not : that-year is divisible by 4 ------------------------------------------ the year that-year has altogether 365 days some-year is a year under consideration some-mo-number is a month number that-mo-number is less than or equal some-mo-number1 in the year that-year month that-mo-number has some-number days -------------------------------------------------------------------------------------- in the year that-year month that-mo-number at most that-mo-number1 has that-number days some-year is a year under consideration some-mo-number1 is a month number sum a-number : in the year that-year month that-mo-number at most that-mo-number1 has some-number days = a-total ------------------------------------------------------------------------------------------------------------------ in the year that-year the months up to that-mo-number1 have that-total days some-day-number is a possible day number in a year in the year some-year the months up to some-mo-number0 have some-total days that-day-number - that-total = some-number that-number is greater than 0 that-mo-number0 is less than 12 that-mo-number0 + 1 = some-mo-number in the year that-year month that-mo-number has some-number1 days that-number is less than or equal that-number1 ----------------------------------------------------------------------------------------- day number that-day-number in that-year is the that-number day of month that-mo-number some-day-number is a possible day number in a year in the year some-year month 1 has some-number1 days that-day-number is less than or equal that-number1 -------------------------------------------------------------------------------- day number that-day-number in that-year is the that-day-number day of month 1 the day of the week of the first day in some-year is some-day1-name the year that-year has altogether some-total days some-day-number is a possible day number in a year that-day-number is less than or equal that-total some-number1 that-day1-name is a day of the week that-day-number + that-number1 = some-number2 that-number2 - 2 = some-number3 that-number3 divided by 7 = a-quotient remainder some-remainder that-remainder + 1 = some-number4 that-number4 some-day-name is a day of the week ---------------------------------------------------------------- in that-year day number that-day-number is that-day-name some-year divided by 4 = a-number remainder 0 --------------------------------------------- that-year is divisible by 4 the day of the week of the first day in this-year is this-day ============================================================= 2004 Thursday 2005 Saturday there is a half hour time block starting this-time1 and ending this-time2 ========================================================================= 600 630 630 700 700 730 730 800 800 830 830 900 900 930 930 1000 1000 1030 1030 1100 1100 1130 1130 1200 1200 1230 1230 1300 1300 1330 1330 1400 1400 1430 1430 1500 1500 1530 1530 1600 1600 1630 1630 1700 1700 1730 1730 1800 1800 1830 1830 1900 this-number is a possible day number in a year ============================================== 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 some-mo-number some-month normally has some-number days ------------------------------------------------------- that-mo-number is a month number this-mo-number this-month normally has this-number days ======================================================= 1 January 31 2 February 28 3 March 31 4 April 30 5 May 31 6 June 30 7 July 31 8 August 31 9 September 30 10 October 31 11 November 30 12 December 31 this-number this-day is a day of the week ======================================== 1 Monday 2 Tuesday 3 Wednesday 4 Thursday 5 Friday 6 Saturday 7 Sunday this-year is a year under consideration ======================================= 2004 2005 this-number is a possible day of a month ======================================== 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | This file is an application written in the language Executable English. | You can view, run and change it by pointing a browser | to www.reengineeringllc.com and selecting Calendar1.