then you create non-Y2K-compliant programs--and you wouldn't want to do
that, would you?
+The proper way to get a complete 4-digit year is simply:
+
+ $year += 1900;
+
+And to get the last two digits of the year (e.g., '01' in 2001) do:
+
+ $year = sprintf("%02d", $year % 100);
+
If EXPR is omitted, does C<gmtime(time())>.
In scalar context, returns the ctime(3) value:
then you create non-Y2K-compliant programs--and you wouldn't want to do
that, would you?
+The proper way to get a complete 4-digit year is simply:
+
+ $year += 1900;
+
+And to get the last two digits of the year (e.g., '01' in 2001) do:
+
+ $year = sprintf("%02d", $year % 100);
+
If EXPR is omitted, uses the current time (C<localtime(time)>).
In scalar context, returns the ctime(3) value: