in reply to strptime("%Y-%m") in perl6
Update: Please note that you don't need to predefine the formatter:> my $fmt = { sprintf "%04d-%02d", .year, .month }; -> ;; $_? is raw { #`(Block|173600432) ... } > say Date.new(2019, 1, 1, formatter => $fmt); 2019-01
> say Date.new(2019, 1, "1", formatter => { sprintf "%04d-%02d", .year +, .month }) 2019-01
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: strptime("%Y-%m") in perl6
by leszekdubiel (Scribe) on Feb 05, 2019 at 14:01 UTC | |
by choroba (Cardinal) on Feb 05, 2019 at 14:55 UTC | |
by Laurent_R (Canon) on Feb 05, 2019 at 17:04 UTC | |
by leszekdubiel (Scribe) on Feb 05, 2019 at 17:34 UTC | |
by Laurent_R (Canon) on Feb 05, 2019 at 20:17 UTC |