Catman...d_date(3pm)
π Catman...d_date(3pm) π
okay bestie, so this is Catmandu::Fix::expand_date from the User Contributed Perl Documentation, and we need to have a chat about it. π«Ά
πΈ NAME πΈ
Catmandu::Fix::expand_date β the fix that takes one lil date field and expands it out into year, month and date. it's giving "deconstructed", it's giving "we spread it out on the table". β¨
π NOTE π
THIS PACKAGE IS DEPRECATED AND WILL BE REMOVED IN THE FUTURE. like, not "someday maybe" β it's on the chopping block. please use Catmandu::Fix::split_date instead, bestie. i'm begging. π
Reasons, in bullet form because we're classy:
- it writes directly in the root of the hash, which is a different behaviour compared to all the other fixes (
sum,count,hash,array..). not like the other girls, and not in a good way π - it adds the new keys in a different location, instead of "in place". rude.
- its behaviour cannot be changed without breaking its current use. so we're stuck with it. tragic. iconic, but tragic.
β¨ SYNOPSIS β¨
# {date => "2001-09-11"}
expand_date()
# => {year => 2001, month => "9", day => "11", date => "2001-09-11"}
# {datestamp => "2001:09"}
expand_date(datestamp)
# => {year => 2001, month => "9", datestamp => "2001:09"}
see how it just. does all that. no cap. π₯
π¦ DESCRIPTION π¦
so the date field gets expanded if it contains a year, optionally followed by numeric month and day, each separated by - or :. that's it, that's the whole vibe check. π
okay that's the whole page, sending u a little mwah, this was perl v5.40.1 dated 2026-01-24, from the User Contributed Perl Documentation, ily, go use split_date π
π
π¦ where this page comes from
- ubuntu resolute: libcatmandu-perl 1.2025-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatmandu-perl 1.2025-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms