Skip to content

Commit b9de84f

Browse files
committed
[io grant] Remove DateTime tutorial from IO::Path docs
1 parent 45e84ad commit b9de84f

File tree

1 file changed

+9
-25
lines changed

1 file changed

+9
-25
lines changed

doc/Type/IO/Path.pod6

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -689,17 +689,12 @@ on Operating Systems where these are available:
689689
690690
=head2 method modified
691691
692-
Return an L<Instant> object representing the timestamp when the file was
692+
Returns an L«C<Instant>|/type/Instant» object indicating when the file was
693693
last modified.
694694
695695
=for code :skip-test
696-
say "path/to/file".IO.modified; # e.g. Instant:1424089165
697-
698-
To obtain a human-readable form of the timestamp, call C<DateTime> method
699-
on the returned C<Instant>, to convert it into a L<DateTime> object:
700-
701-
=for code :skip-test
702-
say "path/to/file".IO.modified.DateTime; # e.g. 2015-02-16T12:18:50Z
696+
say "path/to/file".IO.modified; # Instant:1424089165
697+
say "path/to/file".IO.modified.DateTime; # 2015-02-16T12:18:50Z
703698
704699
=head2 method accessed
705700
@@ -709,28 +704,17 @@ last accessed time may not update on I<each access> to the file, but only
709704
on the first access after modifications.
710705
711706
=for code :skip-test
712-
say "path/to/file".IO.accessed; # e.g. Instant:1424353577
713-
say "path/to/file".IO.accessed.DateTime; # e.g. 2015-02-19T13:45:42Z
707+
say "path/to/file".IO.accessed; # Instant:1424353577
708+
say "path/to/file".IO.accessed.DateTime; # 2015-02-19T13:45:42Z
714709
715710
=head2 method changed
716711
717-
Return an L<Instant> object representing the timestamp when the inode was
718-
last changed.
719-
720-
=for code :skip-test
721-
"path/to/file".IO.changed; # e.g. Instant:1424089165
722-
723-
To obtain a human-readable form of the timestamp, use a L<DateTime> object:
724-
725-
=for code :skip-test
726-
say DateTime.new("path/to/file".IO.changed); # e.g. 2015-02-16T12:18:50Z
727-
728-
or more readably:
712+
Returns an L«C<Instant>|/type/Instant» object indicating the file or directory
713+
was last changed.
729714
730715
=for code :skip-test
731-
my $change_instant = "path/to/file".IO.changed;
732-
my $change_time = DateTime.new($change_instant);
733-
say $change_time; # e.g. 2015-02-16T12:18:50Z
716+
say "path/to/file".IO.changed; # Instant:1424089165
717+
say "path/to/file".IO.changed.DateTime; # 2015-02-16T12:18:50Z
734718
735719
=head1 File permissions retrieval
736720

0 commit comments

Comments
 (0)