in reply to Two digit year with DateTime?
Time::Piece has been a core module since at least 5.10 so can save you having to install extra modules.
johngg@shiraz:~/perl/Monks$ perl -Mstrict -Mwarnings -MTime::Piece -E +' my $tp = localtime(); say qq{2-digit year - }, $tp->yy();' 2-digit year - 19
I hope this is helpful.
Cheers,
JohnGG
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Two digit year with DateTime?
by Your Mother (Archbishop) on Mar 11, 2019 at 19:52 UTC | |
by Aldebaran (Curate) on Mar 12, 2019 at 16:27 UTC | |
by Your Mother (Archbishop) on Mar 12, 2019 at 17:02 UTC |