Help for this page

Select Code to Download


  1. or download this
    enum days   <mo tu we th fr sa su>;
    enum months <jan feb mar apr may jun jul aug sep oct nov dec>;
    ...
                         ~months($^a.month - 1)
                       }
                  ], @dates[^365];
    
  2. or download this
    enum days   <<:mo(1) tu we th fr sa su>>; 
    enum months <<:jan(1) feb mar apr may jun jul aug sep oct nov dec>>;
    ...
    my @ordered = sort [ { ~days(.day-of-week) },
                         { ~months(.month) } is descending
                  ], @dates[^365];
    
  3. or download this
    substr(scalar localtime($_),0,3),
    substr(scalar localtime($_),+5,3)
    
  4. or download this
    $a->[1] cmp $b->[1] || $b->[2] cmp $a->[2]