AAT::Datetime(3)
π AAT::Datetime β bestie edition π
ok so this is AAT::Datetime(3), a lil Perl module from the AAT family, and it is literally your whole date-and-time bestie. it does months, weekdays, weeks, deltas, and it will hand you the beginning and end of basically any time period you could ever want. iconic behavior. let's get into it π¦
β¨ FUNCTIONS β¨
πΈ Month_Name($month)
gives you the actual name of a month. like you hand it a number and it hands you back the vibe.
Parameters:
$monthβ Integer value of Month
Returns:
$month_nameβ String value of Month
πΈ Month_Nb_Days($year, $month)
how many days are in this month? it knows. (yes, it takes the year too, so it's not out here getting February wrong π )
Parameters:
$yearβ year$monthβ month
Returns:
$daysinmonthβ Number of days
πΈ Delta
Returns Delta in minutes between 2 dates. just minutes. that's the whole thing. no cap.
πΈ Seconds_Since_1970($year, $month, $day, $hour, $min)
Returns number of seconds since 1970. the epoch era. very vintage of it β
πΈ WeekDay($year, $month, $day)
Get the Day of Week (1 for Monday, 7 for Sunday). so 1 is Monday bestie, 7 is Sunday, don't get it twisted.
Parameters:
$yearβ year$monthβ month$dayβ day
Returns:
$dayofweekβ Day of Week
πΈ WeekDay_Name($wday)
Get the Day of Week β but the name version this time, not the number.
Parameters:
$wdayβ Integer value of Day of Week
Returns:
$weekday_nameβ String value of Day of Week
πΈ YearWeek($year, $month, $day)
Get the Week of the Year. that's it, that's the function π
πΈ Current_Day()
Returns an Array of 2 hashrefs with the Begin & End of the Day. two hashrefs. begin, then end. obsessed.
πΈ Current_Hour()
Returns an Array of 2 hashrefs with the Begin & End of the Hour.
πΈ Current_Month()
Returns an Array of 2 hashrefs with the Begin & End of the Month.
πΈ Current_Week()
Returns an Array of 2 hashrefs with the Begin & End of the Week.
πΈ Current_Year()
Returns an Array of 2 hashrefs with the Begin & End of the Year.
πΈ Last_Day()
Returns an Array of 2 hashrefs with the Begin & End of the Last/Previous Day.
πΈ Last_Hour()
Returns an Array of 2 hashrefs with the Begin & End of the Last/Previous Hour.
πΈ Last_Month()
Returns an Array of 2 hashrefs with the Begin & End of the Last/Previous Month.
πΈ Last_Week()
Returns an Array of 2 hashrefs with the Begin & End of the Last/Previous Week.
πΈ Last_Year()
Returns an Array of 2 hashrefs with the Begin & End of the Last/Previous Year.
π AUTHOR π
Sebastien Thebert <octo.devel@gmail.com>
ok that's the whole page, you ate that π
this was documented for perl v5.22.2 and dated 2016-05-04, and yeah it's AAT::Datetime(3) β go forth and format some timestamps bestie π«Άβ¨
π¦ where this page comes from
- ubuntu jammy: octopussy 1.0.6-0ubuntu2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms