You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: stdlib/Dates/docs/src/index.md
+23-24
Original file line number
Diff line number
Diff line change
@@ -400,29 +400,29 @@ As a bonus, all period arithmetic objects work directly with ranges:
400
400
401
401
```jldoctest
402
402
julia> dr = Date(2014,1,29):Day(1):Date(2014,2,3)
403
-
Date(2014, 1, 29):1 day:Date(2014, 2, 3)
403
+
2014-01-29:1 day:2014-02-03
404
404
405
405
julia> collect(dr)
406
406
6-element Array{Date,1}:
407
-
Date(2014, 1, 29)
408
-
Date(2014, 1, 30)
409
-
Date(2014, 1, 31)
410
-
Date(2014, 2, 1)
411
-
Date(2014, 2, 2)
412
-
Date(2014, 2, 3)
407
+
2014-01-29
408
+
2014-01-30
409
+
2014-01-31
410
+
2014-02-01
411
+
2014-02-02
412
+
2014-02-03
413
413
414
414
julia> dr = Date(2014,1,29):Dates.Month(1):Date(2014,07,29)
415
-
Date(2014, 1, 29):1 month:Date(2014, 7, 29)
415
+
2014-01-29:1 month:2014-07-29
416
416
417
417
julia> collect(dr)
418
418
7-element Array{Date,1}:
419
-
Date(2014, 1, 29)
420
-
Date(2014, 2, 28)
421
-
Date(2014, 3, 29)
422
-
Date(2014, 4, 29)
423
-
Date(2014, 5, 29)
424
-
Date(2014, 6, 29)
425
-
Date(2014, 7, 29)
419
+
2014-01-29
420
+
2014-02-28
421
+
2014-03-29
422
+
2014-04-29
423
+
2014-05-29
424
+
2014-06-29
425
+
2014-07-29
426
426
```
427
427
428
428
## Adjuster Functions
@@ -492,15 +492,14 @@ julia> filter(dr) do x
492
492
Dates.dayofweekofmonth(x) == 2
493
493
end
494
494
8-element Array{Date,1}:
495
-
Date(2014, 4, 8)
496
-
Date(2014, 5, 13)
497
-
Date(2014, 6, 10)
498
-
Date(2014, 7, 8)
499
-
Date(2014, 8, 12)
500
-
Date(2014, 9, 9)
501
-
Date(2014, 10, 14)
502
-
Date(2014, 11, 11)
503
-
495
+
2014-04-08
496
+
2014-05-13
497
+
2014-06-10
498
+
2014-07-08
499
+
2014-08-12
500
+
2014-09-09
501
+
2014-10-14
502
+
2014-11-11
504
503
```
505
504
506
505
Additional examples and tests are available in [`stdlib/Dates/test/adjusters.jl`](https://github.com/JuliaLang/julia/blob/master/stdlib/Dates/test/adjusters.jl).
0 commit comments