IceDragon
By: a guest | Dec 13th, 2008 | Syntax:
None | Size: 1.96 KB | Hits: 29 | Expires: Never
The time segments and ranges below need to be converted into precise dates or date ranges,
either normal or relative from current time. Once that is done, we can handle everything
in one unit in programming. Any and all English in a time unit has to be converted into
UNIXTIME before it can be dealt with.
SPECIFIC TIME SEGMENTS
----------------------
These point to a precise date and/or time rather than a range between timestamps.
Single relative time segment with a single precise unit:
_
1| #[ ]unit[s]
| -------
| h[ou]r
| min[ute]
| sec[ond]
| d[ay]
| w[ee]k
| mon[th]
| y[ea]r
|
2| NOW
_|
Single relative time segment with multiple units:
_
1| #[ ]unit1[s][,]#[ ]unitN[s]
|
2| #[ ]unit1[s][,]#[ ]unit2[s][,[ ]]and #[ ]unit3[s]
_|
Time segmentation in past:
_
N| <TSeg> ago
| <TSeg> in [the ]past
| <TSeg> before NOW
| |
| V
_| <TSeg> before <TStamp>
Time segmentation in future
_
N| in <TSeg>
| in <TSeg> from NOW
| <TSeg> in [the ]future
| <TSeg> from NOW
| |
| V
| <TSeg> from <TStamp>
| <TSeg> after <TStamp>
_|
TIME RANGES
-----------
These are basicly macros that are valid for a time range rather than a specific
timestamp.
Time ranges in past
_
N| YESTERDAY = LAST DAY
_| LAST unit = 1 <unit> back, from the beginning till the end of it.
Time ranges that intersect with present
_
N| TODAY = THIS DAY from 0000 to 2359
_|
Time ranges in future
_
N| TOMORROW = NEXT DAY
| NEXT unit = 1 <unit> FROM NOW, from the beginning till the end of it.
| NEXT day = First <DAY> (i.e. Thursday) FROM THIS <DAY>
_| THIS day = First <DAY> (i.e. Thursday) FROM NOW (a second later it can still be THIS <DAY>)
Miscellaneous ranges. 1 hour fuzziness allowed (i.e. 1130 is considered morning,
but might also be considered afternoon)
_
N| MORNING = 0500-1159
| AFTERNOON = 1200-1759
| EVENING = 1800-2259
_| NIGHT = 2300-0459