AAT::Datetime(3)

πŸ“¦ version 1.0.6, in ubuntu jammy

πŸ’– 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