summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hukins <tom@eborcom.com>2012-01-07 15:37:38 +0000
committerFather Chrysostomos <sprout@cpan.org>2012-01-07 08:27:12 -0800
commit570b1bb16d6ffed436664e042c27368e585fb206 (patch)
tree307654884d83f373ba297a992257fcddba9af1ff
parent70ce9249c4e5e892ce6ec830baedb9e3aed67ded (diff)
downloadperl-570b1bb16d6ffed436664e042c27368e585fb206.tar.gz
Make localtime()' s documentation more succinct
It's now twelve years since Y2K, so the documentation should not make such a fuss about it.
-rw-r--r--pod/perlfunc.pod8
1 files changed, 2 insertions, 6 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 7973c84d63..b2e9f01bb1 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -3131,15 +3131,11 @@ This makes it easy to get a month name from a list:
print "$abbr[$mon] $mday";
# $mon=9, $mday=18 gives "Oct 18"
-C<$year> is the number of years since 1900, B<not> just the last two digits
-of the year. That is, C<$year> is C<123> in year 2023. The proper way
-to get a 4-digit year is simply:
+C<$year> contains the number of years since 1900. To get a 4-digit
+year write:
$year += 1900;
-Otherwise you create non-Y2K-compliant programs--and you wouldn't want
-to do that, would you?
-
To get the last two digits of the year (e.g., "01" in 2001) do:
$year = sprintf("%02d", $year % 100);