mm-dd-yyyy
ErrorsCollection

mm-dd-yyyy

Synthesised documentation from type/Dateish

From type/Dateish

See Original text in context

method mm-dd-yyyy(str $sep = "-" --> Str:D)

Returns the date in MM-DD-YYYY format (ISO 8601). The optional positional argument $sep, which defaults to -, is a one-character separator placed between the different parts of the date.

say Date.new("2015-11-15").mm-dd-yyyy;   # OUTPUT: «11-15-2015␤» 
say DateTime.new(1470853583).mm-dd-yyyy# OUTPUT: «08-10-2016␤» 
say Date.today.mm-dd-yyyy("/");          # OUTPUT: «03/14/2020␤»