DateTi...ng::es(3pm)

๐Ÿ’ƒ NAME ๐Ÿ’ƒ

DateTime::Format::Flexible::lang::es โ€” the spanish language plugin, bestie ๐Ÿ‡ช๐Ÿ‡ธโœจ


๐ŸŒธ DESCRIPTION ๐ŸŒธ

okay so real talk: you should not need to use this module directly. it's giving backstage crew, not main character. ๐Ÿ™ˆ

if you only want to use one language, just specify the lang property when parsing a date. easy peasy.

example:

my $dt = DateTime::Format::Flexible->parse_datetime(
    '29 de febrero de 1996' ,
    lang => ['es']
);
# $dt is now 1996-02-29T00:00:00

note that this is not required โ€” by default ALL languages are scanned when trying to parse a date. all of them. every single one. it's giving overachiever ๐Ÿ’…


โœจ the methods โœจ

๐ŸŽ€ new

instantiate a new instance of this module. fresh start, new you, slay.

๐ŸŽ€ months

month name regular expressions along with the month numbers (enero|enro|eno => 1)

๐ŸŽ€ days

day name regular expressions along the the day numbers (lunes => 1)

๐ŸŽ€ day_numbers

maps day of month names to the corresponding numbers (primero => 01)

๐ŸŽ€ hours

maps hour names to numbers (ediodia => 12:00:00)

๐ŸŽ€ remove_strings

strings to remove from the date (de as in cinco de mayo) ๐Ÿฅ‘๐ŸŽ‰

๐ŸŽ€ parse_time

currently does nothing. literally just vibing. zero thoughts, head empty ๐Ÿซถ

๐ŸŽ€ string_dates

maps string names to real dates (ahora => DateTime->now)

๐ŸŽ€ relative

parse relative dates (ago => hace, from => a partir de ahora, next => siguiente, last => pasado)

๐ŸŽ€ math_strings

useful strings when doing datetime math ๐Ÿงฎโœจ

๐ŸŽ€ timezone_map

maps unofficial timezones to official timezones for this language (PDT => America/Tijuana)


๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

Tom Heady
CPAN ID: thinc
Punch, Inc.
cpan@punch.net
http://www.punch.net/

Copyright 2011 Tom Heady.

This program is free software; you can redistribute it and/or modify it under the terms of either:

  • the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or
  • the Artistic License.

๐Ÿฆ‹ SEE ALSO ๐Ÿฆ‹

DateTime::Format::Flexible


and that's the whole page bestie!! this doc shipped as part of perl v5.40.0, dated 2025-01-11, and it lives in the User Contributed Perl Documentation section of the manual โ€” aka man page section 3pm ๐Ÿ’…โœจ

go forth and parse those spanish dates, you absolute icon ๐ŸŒˆ๐Ÿ’œ

๐Ÿ“ฆ where this page comes from