2016-01-17 11:23:17 -06:00
|
|
|
# See tests/jq.test and the jq manual for more information.
|
|
|
|
|
|
|
|
# strptime() is not available on mingw/WIN32
|
|
|
|
[strptime("%Y-%m-%dT%H:%M:%SZ")|(.,mktime)]
|
2017-11-23 01:51:22 -06:00
|
|
|
"2015-03-05T23:51:47Z"
|
2016-01-17 11:23:17 -06:00
|
|
|
[[2015,2,5,23,51,47,4,63],1425599507]
|
|
|
|
|
2017-05-21 16:24:48 -05:00
|
|
|
# Check day-of-week and day of year computations
|
|
|
|
# (should trip an assert if this fails)
|
2017-11-29 20:40:36 -05:00
|
|
|
# This date range
|
|
|
|
last(range(365 * 67)|("1970-03-01T01:02:03Z"|strptime("%Y-%m-%dT%H:%M:%SZ")|mktime) + (86400 * .)|strftime("%Y-%m-%dT%H:%M:%SZ")|strptime("%Y-%m-%dT%H:%M:%SZ"))
|
2017-05-21 16:24:48 -05:00
|
|
|
null
|
2017-11-29 20:40:36 -05:00
|
|
|
[2037,1,11,1,2,3,3,41]
|
2017-05-21 16:24:48 -05:00
|
|
|
|
2016-01-17 11:23:17 -06:00
|
|
|
# %e is not available on mingw/WIN32
|
|
|
|
strftime("%A, %B %e, %Y")
|
|
|
|
1435677542.822351
|
|
|
|
"Tuesday, June 30, 2015"
|
|
|
|
|
|
|
|
|