Name
SPVM::Sys::Time::Tm - struct tm in the C language
Description
The Sys::Time::Tm class represents struct tm in the C language.
Usage
use Sys::Time::Tm;
my $tm = Sys::Time::Tm->new;
my $sec = $tm->tm_sec;
$tm->set_tm_sec(12);
my $min = $tm->tm_min;
$tm->set_tm_min(34);
my $hour = $tm->tm_hour;
$tm->set_tm_hour(12);
my $mday = $tm->tm_mday;
$tm->set_tm_mday(4);
my $mon = $tm->tm_mon;
$tm->set_tm_mon(3);
my $year = $tm->tm_year;
$tm->set_tm_year(1);
my $wday = $tm->tm_wday;
$tm->set_tm_wday(12);
my $yday = $tm->tm_yday;
$tm->set_tm_yday(234);
my $isdst = $tm->tm_isdst;
$tm->set_tm_isdst(1);
Class Methods
new
static method new : Sys::Time::Tm ();
Creates a new Sys::Time::Tm object.
my $tm = Sys::Time::Tm->new;
Instance Methods
tm_sec
method tm_sec : int ();
Gets tm_sec
.
set_tm_sec
method set_tm_sec : void ($tm_sec : int);
Sets tm_sec
.
tm_min
method tm_min : int ();
Gets tm_min
.
set_tm_min
method set_tm_min : void ($tm_min : int);
Sets tm_min
.
tm_hour
method tm_hour : int ();
Gets tm_hour
.
set_tm_hour
method set_tm_hour : void ($tm_hour : int);
Sets tm_hour
.
tm_mday
method tm_mday : int ();
Gets tm_mday
.
set_tm_mday
method set_tm_mday : void ($tm_mday : int);
Sets tm_mday
.
tm_mon
method tm_mon : int ();
Gets tm_mon
.
set_tm_mon
method set_tm_mon : void ($tm_mon : int);
Sets tm_mon
.
tm_year
method tm_year : int ();
Gets tm_year
.
set_tm_year
method set_tm_year : void ($tm_year : int);
Sets tm_year
.
tm_wday
method tm_wday : int ();
Gets tm_wday
.
set_tm_wday
method set_tm_wday : void ($tm_wday : int);
Sets tm_wday
.
tm_yday
method tm_yday : int ();
Gets tm_yday
.
set_tm_yday
method set_tm_yday : void ($tm_yday : int);
Sets tm_yday
.
tm_isdst
method tm_isdst : int ();
Gets tm_isdst
.
set_tm_isdst
method set_tm_isdst : void ($tm_isdst : int);
Sets tm_isdst
.
Copyright & License
Copyright (c) 2023 Yuki Kimoto
MIT License