Guest User

Untitled

a guest
Jul 20th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. use String::Formatter method_stringf => {
  2. -as => 'datetimef',
  3.  
  4. codes => {
  5. f => 'strftime',
  6. c => 'format_cldr',
  7. s => sub { "$_[0]" },
  8. },
  9. };
  10. print datetimef("%{%Y-%m-%d}f is the same as %{yyyy-MM-dd}c.", DateTime->now);
Add Comment
Please, Sign In to add comment