Share Pastebin
Guest
Public paste!

IceDragon

By: a guest | Dec 13th, 2008 | Syntax: None | Size: 1.96 KB | Hits: 29 | Expires: Never
Copy text to clipboard
  1. The time segments and ranges below need to be converted into precise dates or date ranges,
  2. either normal or relative from current time. Once that is done, we can handle everything
  3. in one unit in programming. Any and all English in a time unit has to be converted into
  4. UNIXTIME before it can be dealt with.
  5.  
  6. SPECIFIC TIME SEGMENTS
  7. ----------------------
  8. These point to a precise date and/or time rather than a range between timestamps.
  9.  
  10. Single relative time segment with a single precise unit:
  11. _
  12. 1|  #[ ]unit[s]
  13.  |      -------
  14.  |      h[ou]r
  15.  |      min[ute]
  16.  |      sec[ond]
  17.  |      d[ay]
  18.  |      w[ee]k
  19.  |      mon[th]
  20.  |      y[ea]r
  21.  |
  22. 2|  NOW
  23. _|
  24.  
  25.  
  26. Single relative time segment with multiple units:
  27. _
  28. 1| #[ ]unit1[s][,]#[ ]unitN[s]
  29.  |
  30. 2| #[ ]unit1[s][,]#[ ]unit2[s][,[ ]]and #[ ]unit3[s]
  31. _|
  32.  
  33.  
  34. Time segmentation in past:
  35. _
  36. N| <TSeg> ago
  37.  | <TSeg> in [the ]past
  38.  | <TSeg> before NOW
  39.  |   |
  40.  |   V
  41. _| <TSeg> before <TStamp>
  42.  
  43.  
  44. Time segmentation in future
  45. _
  46. N| in <TSeg>
  47.  | in <TSeg> from NOW
  48.  | <TSeg> in [the ]future
  49.  | <TSeg> from NOW
  50.  |   |
  51.  |   V
  52.  | <TSeg> from <TStamp>
  53.  | <TSeg> after <TStamp>
  54. _|
  55.  
  56.  
  57. TIME RANGES
  58. -----------
  59. These are basicly macros that are valid for a time range rather than a specific
  60. timestamp.
  61.  
  62. Time ranges in past
  63. _
  64. N| YESTERDAY = LAST DAY
  65. _| LAST unit = 1 <unit> back, from the beginning till the end of it.
  66.  
  67.  
  68. Time ranges that intersect with present
  69. _
  70. N| TODAY = THIS DAY from 0000 to 2359
  71. _|
  72.  
  73.  
  74. Time ranges in future
  75. _
  76. N| TOMORROW  = NEXT DAY
  77.  | NEXT unit = 1 <unit> FROM NOW, from the beginning till the end of it.
  78.  | NEXT day  = First <DAY> (i.e. Thursday) FROM THIS <DAY>
  79. _| THIS day  = First <DAY> (i.e. Thursday) FROM NOW (a second later it can still be THIS <DAY>)
  80.  
  81.  
  82. Miscellaneous ranges. 1 hour fuzziness allowed (i.e. 1130 is considered morning,
  83. but might also be considered afternoon)
  84. _
  85. N| MORNING   = 0500-1159
  86.  | AFTERNOON = 1200-1759
  87.  | EVENING   = 1800-2259
  88. _| NIGHT     = 2300-0459