about summary refs log blame commit diff stats
path: root/lib/Taurus/Timestamp.rakumod
blob: e9013bc69f57b540b33ad96bb46a1bc50ad936f3 (plain) (tree)
1
2
3
4
5
6
7






                                                                       
unit module Taurus::Timestamp;

sub timestamp-to-date(Str $stamp --> Date) is export {
    Date.new(
        "%s-%s-%s".sprintf(.substr(6, 4), .substr(3, 2), .substr(0, 2))
    ) with $stamp;
}