forked from tidyverse/lubridate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSPIRATIONS
112 lines (93 loc) · 2.12 KB
/
INSPIRATIONS
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
Current and future inspirations for functionality.
Comprehensive date time APIs:
* http://joda-time.sourceforge.net
* http://tinyurl.com/jsr310
* http://tinyurl.com/boost-dt
Elegant user interfaces for manipulating dates
* http://github.com/olliesaunders/suprdate/tree/master
* http://runt.rubyforge.org/
Intelligent date time parsers
* http://www.datejs.com/
* http://chronic.rubyforge.org/
Date time standards
* http://en.wikipedia.org/wiki/ISO_8601
* http://tools.ietf.org/html/rfc3339
# Year = 4 Digits
# Month = 2 Digits
# mday = 2 Digits
# hour = 2 Digits
# minute = 2 Digits
# second = 2 Digits
# offset that shows difference from UTC
# Ordered from least precise to most
# 2003-08-06 04:28-02:00
# 2003-08-06T04:28Z
Variety of formats (from http://chronic.rubyforge.org/):
Simple
thursday
november
summer
friday 13:00
mon 2:35
4pm
6 in the morning
friday 1pm
sat 7 in the evening
yesterday
today
tomorrow
this tuesday
next month
last winter
this morning
last night
this second
yesterday at 4:00
last friday at 20:00
last week tuesday
tomorrow at 6:45pm
afternoon yesterday
thursday last week
Complex
3 years ago
5 months before now
7 hours ago
7 days from now
1 week hence
in 3 hours
1 year ago tomorrow
3 months ago saturday at 5:00 pm
7 hours before tomorrow at noon
3rd wednesday in november
3rd month next year
3rd thursday this september
4th day last week
Specific Dates
January 5
dec 25
may 27th
October 2006
oct 06
jan 3 2010
february 14, 2004
3 jan 2000
17 april 85
5/27/1979
27/5/1979
05/06
1979-05-27
Friday
5
4:00
17:00
0800
Specific Times (many of the above with an added time)
January 5 at 7pm
1979-05-27 05:00
etc
Natural (from http://code.google.com/p/datejs/)
Date.parse('July 23rd 2004') // Fri Jul 23 2004
Date.parse('Sat July 3, 2004') // Sat Jul 03 2004
Date.parse('July 8th, 2004, 10:30 PM') // Thu Jul 08 2004 22:30:00
Date.parse('2004-07-15T06:45:00') // Thu Jul 15 2004 06:45:00
Date.parse('Thu, 1 July 2004 22:30:00 GMT') // Thu Jul 01 2004 16:30:00