Format functionality in datetime mods
Example:
stdout.print_line(Odt.show{(:C) C.spec('[year]-[month]-[day]T[hour24]:[minute]:[second][offset]') }) stdout.print_line(Odt.show{(:C) C.spec('[year short]-[month pad0]-[day]T[hour24]:[minute]:[second][offset colon Z]') })
Formatting should be handled by FORMAT.format.
:OFFSET_DATETIME.require_from('kink/datetime/') :FORMAT.require_from('kink/') :Odt <- OFFSET_DATETIME.new(1982 1 23 1 23 45.987654321 OFFSET.new(- (3 * 60 + 30))) :Msg <- 'hey ho' stdout.print_line( FORMAT.format('{Odt} -- {Msg}'){(:C) C.named_args('Odt' Odt 'Msg' Msg) } ) # => 1982-01-23T01:23:45.987654321-03:30 -- hey ho stdout.print_line( FORMAT.format('{Odt%year} / {Odt%month} / {Odt%day} -- {Msg}'){(:C) C.named_args('Odt' Odt 'Msg' Msg) } ) # => 1982 / 01 / 23 -- hey ho
Working on issue_0039973-datetime-format
Closed by 4a0634228c6c8e374bf211d6d6f884bfac10f484
Format functionality should be added to datetime mods