I can't find this behavior in the docs and I can't see how it might be
useful, so maybe this is just a bug?
This code:
#!/usr/bin/env perl
# Test Datetime::Incomplete and straight Datetime behavior
use DateTime;
use DateTime::Incomplete;
use strictures 2;
my %parms = (
year => 2021,
month => 4,
day => 11,
hour => 16,
minute => 52,
second => 33,
nanosecond => 600
);
my $dt = DateTime->new (%parms);
print $dt->strftime ("%FT%T.%N %Z"), "\n";
$dt = DateTime::Incomplete->new (%parms);
print $dt->strftime ("%FT%T.%N %Z"), "\n";
When run (on FreeBSD) produces this output:
$ ./t009.pl
2021-04-11T16:52:33.000000600 floating
2021-04-11T16:52:33.09d xxxxx
The "%N" format specifier produces "09d" in the second case (from a
DT::Incomplete), which rather looks like what a printf format specifier should be rather than what
the actual output should look like?
--
David Dyer-Bennet,d...@dd-b.net;http://dd-b.net/
Words Over Windowshttp://WordsOverWindows.dd-b.net/
Snapshots:http://dd-b.net/dd-b/SnapshotAlbum/data/
Photos:http://dd-b.net/photography/gallery/