.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Sisimai::DateTime 3pm" .TH Sisimai::DateTime 3pm 2024-03-16 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Sisimai::DateTime \- Date and time utilities .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 3 \& use Sisimai::DateTime; \& my $v = \*(AqSat Mar 1 13:47:46 JST 2014\*(Aq; \& print Sisimai::DateTime\->parse($v); # Sat, 1 Mar 2014 13:47:46 +0900 .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" Sisimai::DateTime provide methods for dealing date and time. .SH "CLASS METHODS" .IX Header "CLASS METHODS" .ie n .SS """\fBparse(Date string)\fP""" .el .SS "\f(CW\fP\f(CBparse(Date string)\fP\f(CW\fP" .IX Subsection "parse(Date string)" \&\f(CWparse()\fR convert various date format string. .PP .Vb 4 \& my $x = \*(AqFri, 9 Apr 2004 04:01:03 +0000 (GMT)\*(Aq; \& my $y = \*(Aq27 Apr 2009 08:08:54 +0900\*(Aq; \& print Sisimai::DateTime\->parse($x); # Fri, 9 Apr 2004 04:01:03 +0000 \& print Sisimai::DateTime\->parse($y); # Thu, 27 Apr 2009 08:08:54 +0900 .Ve .ie n .SS """\fBabbr2tz(Abbr)\fP""" .el .SS \f(CW\fP\f(CBabbr2tz(Abbr)\fP\f(CW\fP .IX Subsection "abbr2tz(Abbr)" \&\f(CWabbr2tz()\fR convert a time zone abbreviation to 4 digit string of time zone. .PP .Vb 3 \& print Sisimai::DateTime\->abbr2tz(\*(AqJST\*(Aq); # +0900 \& print Sisimai::DateTime\->abbr2tz(\*(AqUTC\*(Aq); # +0000 \& print Sisimai::DateTime\->abbr2tz(\*(AqCDT\*(Aq); # \-0500 .Ve .SH AUTHOR .IX Header "AUTHOR" azumakuniyuki .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright (C) 2014\-2023 azumakuniyuki, All rights reserved. .SH LICENSE .IX Header "LICENSE" This software is distributed under The BSD 2\-Clause License.