Module | Runt |
In: |
lib/runt/pdate.rb
lib/runt/daterange.rb lib/runt/dprecision.rb lib/runt/temporalexpression.rb lib/runt/sugar.rb lib/runt/schedule.rb lib/runt.rb |
The Runt module is the main namespace for all Runt modules and classes. Using require statements, it makes the entire Runt library available.It also defines some new constants and exposes some already defined in the standard library classes Date and DateTime.
See also runt/sugar_rb which re-opens this module and adds some additional functionality
See also date.rb
MONTHS | = | '(january|february|march|april|may|june|july|august|september|october|november|december)' | ||
DAYS | = | '(sunday|monday|tuesday|wednesday|thursday|friday|saturday)' | ||
WEEK_OF_MONTH_ORDINALS | = | '(first|second|third|fourth|last|second_to_last)' | ||
ORDINAL_SUFFIX | = | '(?:st|nd|rd|th)' | ||
ORDINAL_ABBR | = | '(st|nd|rd|th)' | ||
Sunday | = | Date::DAYNAMES.index("Sunday") | Yes it‘s true, I‘m a big idiot! | |
Monday | = | Date::DAYNAMES.index("Monday") | ||
Tuesday | = | Date::DAYNAMES.index("Tuesday") | ||
Wednesday | = | Date::DAYNAMES.index("Wednesday") | ||
Thursday | = | Date::DAYNAMES.index("Thursday") | ||
Friday | = | Date::DAYNAMES.index("Friday") | ||
Saturday | = | Date::DAYNAMES.index("Saturday") | ||
Sun | = | Date::ABBR_DAYNAMES.index("Sun") | ||
Mon | = | Date::ABBR_DAYNAMES.index("Mon") | ||
Tue | = | Date::ABBR_DAYNAMES.index("Tue") | ||
Wed | = | Date::ABBR_DAYNAMES.index("Wed") | ||
Thu | = | Date::ABBR_DAYNAMES.index("Thu") | ||
Fri | = | Date::ABBR_DAYNAMES.index("Fri") | ||
Sat | = | Date::ABBR_DAYNAMES.index("Sat") | ||
January | = | Date::MONTHNAMES.index("January") | ||
February | = | Date::MONTHNAMES.index("February") | ||
March | = | Date::MONTHNAMES.index("March") | ||
April | = | Date::MONTHNAMES.index("April") | ||
May | = | Date::MONTHNAMES.index("May") | ||
June | = | Date::MONTHNAMES.index("June") | ||
July | = | Date::MONTHNAMES.index("July") | ||
August | = | Date::MONTHNAMES.index("August") | ||
September | = | Date::MONTHNAMES.index("September") | ||
October | = | Date::MONTHNAMES.index("October") | ||
November | = | Date::MONTHNAMES.index("November") | ||
December | = | Date::MONTHNAMES.index("December") | ||
First | = | 1 | ||
Second | = | 2 | ||
Third | = | 3 | ||
Fourth | = | 4 | ||
Fifth | = | 5 | ||
Sixth | = | 6 | ||
Seventh | = | 7 | ||
Eighth | = | 8 | ||
Eigth | = | 8 | ||
Ninth | = | 9 | ||
Tenth | = | 10 | ||
LastProc | = | ApplyLast.new | ||
Last | = | LastProc[First] | ||
Last_of | = | LastProc[First] | ||
Second_to_last | = | LastProc[Second] |