Skip to main content
Commonmark migration
Source Link

##05AB1E, 51 42 41 bytes##

05AB1E, 51 42 41 bytes

2ô¦`ï<•r–ºþ¯Bê€õaPù£—^5AºüLwÇ–è•35B3ôsèsJ

Explanation

                                           # implicit input, 123405
2ô                                         # split input into pieces of 2, ['12','34','05']
  ¦`                                       # push last 2 elements to stack, '05', '34'
    ï<                                     # convert month to its int index, 4
      •r–ºþ¯Bê€õaPù£—^5AºüLwÇ–è•35B        # get compressed string containing 3-letter months, 
                                             JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC
                                   3ô      # split into pieces of 3
                                             ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC']
                                     sè    # get month at index retrieved earlier, MAY
                                       sJ  # join with 2-digit year and implicitly print, MAY34

Try it online

9 bytes saved thanks to string compression, courtesy of @Adnan

##05AB1E, 51 42 41 bytes##

2ô¦`ï<•r–ºþ¯Bê€õaPù£—^5AºüLwÇ–è•35B3ôsèsJ

Explanation

                                           # implicit input, 123405
2ô                                         # split input into pieces of 2, ['12','34','05']
  ¦`                                       # push last 2 elements to stack, '05', '34'
    ï<                                     # convert month to its int index, 4
      •r–ºþ¯Bê€õaPù£—^5AºüLwÇ–è•35B        # get compressed string containing 3-letter months, 
                                             JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC
                                   3ô      # split into pieces of 3
                                             ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC']
                                     sè    # get month at index retrieved earlier, MAY
                                       sJ  # join with 2-digit year and implicitly print, MAY34

Try it online

9 bytes saved thanks to string compression, courtesy of @Adnan

05AB1E, 51 42 41 bytes

2ô¦`ï<•r–ºþ¯Bê€õaPù£—^5AºüLwÇ–è•35B3ôsèsJ

Explanation

                                           # implicit input, 123405
2ô                                         # split input into pieces of 2, ['12','34','05']
  ¦`                                       # push last 2 elements to stack, '05', '34'
    ï<                                     # convert month to its int index, 4
      •r–ºþ¯Bê€õaPù£—^5AºüLwÇ–è•35B        # get compressed string containing 3-letter months, 
                                             JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC
                                   3ô      # split into pieces of 3
                                             ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC']
                                     sè    # get month at index retrieved earlier, MAY
                                       sJ  # join with 2-digit year and implicitly print, MAY34

Try it online

9 bytes saved thanks to string compression, courtesy of @Adnan

added 167 characters in body
Source Link
Emigna
  • 53k
  • 5
  • 43
  • 162

##05AB1E, 51 4242 41 bytes##

2ô¤ï<•r–ºþ¯Bê€õaPù£—^5AºüLwÇ–è•35B3ôsès1èJ2ô¦`ï<•r–ºþ¯Bê€õaPù£—^5AºüLwÇ–è•35B3ôsèsJ

Explanation

                                           # implicit input, 123405
2ô                                         # split input into pieces of 2, ['12','34''05']'34','05']
  ¤ï¦`                                       # get thepush last piece2 aselements intto stack, 5
'05', '34'
   < ï<                                     # decrease byconvert 1month to get indexits ofint monthindex, 4
     •r–ºþ¯Bê€õaPù£—^5AºüLwÇ–è•35B •r–ºþ¯Bê€õaPù£—^5AºüLwÇ–è•35B        # get compressed string containing 3-letter months, 
                                             JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC
                                         # split into pieces of 3
                                             ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC']
                                         # get month at index retrieved earlier, MAY
                                      s1è sJ  # getjoin lastwith 2 digits of-digit year, 34
                                         J # join and implicitly print, MAY34

Try it online

9 bytes saved thanks to string compression, courtesy of @Adnan

##05AB1E, 51 42 bytes##

2ô¤ï<•r–ºþ¯Bê€õaPù£—^5AºüLwÇ–è•35B3ôsès1èJ

Explanation

                                           # implicit input, 123405
2ô                                         # split input into pieces of 2, ['12','34''05']
  ¤ï                                       # get the last piece as int, 5
    <                                      # decrease by 1 to get index of month, 4
     •r–ºþ¯Bê€õaPù£—^5AºüLwÇ–è•35B         # get compressed string containing 3-letter months, 
                                             JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC
                                         # split into pieces of 3
                                             ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC']
                                         # get month at index retrieved earlier, MAY
                                      s1è  # get last 2 digits of year, 34
                                         J # join and implicitly print, MAY34

Try it online

9 bytes saved thanks to string compression, courtesy of @Adnan

##05AB1E, 51 42 41 bytes##

2ô¦`ï<•r–ºþ¯Bê€õaPù£—^5AºüLwÇ–è•35B3ôsèsJ

Explanation

                                           # implicit input, 123405
2ô                                         # split input into pieces of 2, ['12','34','05']
  ¦`                                       # push last 2 elements to stack, '05', '34'
    ï<                                     # convert month to its int index, 4
      •r–ºþ¯Bê€õaPù£—^5AºüLwÇ–è•35B        # get compressed string containing 3-letter months, 
                                             JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC
                                         # split into pieces of 3
                                             ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC']
                                         # get month at index retrieved earlier, MAY
                                       sJ  # join with 2-digit year and implicitly print, MAY34

Try it online

9 bytes saved thanks to string compression, courtesy of @Adnan

added 167 characters in body
Source Link
Emigna
  • 53k
  • 5
  • 43
  • 162

##05AB1E, 51 42 bytes##

2ô¤ï<•r–ºþ¯Bê€õaPù£—^5AºüLwÇ–è•35B3ôsès1èJ

Explanation

                                           # implicit input, 123405
2ô                                         # split input into pieces of 2, ['12','34''05']
  ¤ï                                       # get the last piece as int, 5
    <                                      # decrease by 1 to get index of month, 4
     •r–ºþ¯Bê€õaPù£—^5AºüLwÇ–è•35B         # get compressed string containing 3-letter months, 
                                             JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC
                                  3ô       # split into pieces of 3
                                             ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC']
                                    sè     # get month at index retrieved earlier, MAY
                                      s1è  # get last 2 digits of year, 34
                                         J # join and implicitly print, MAY34

Try it online

9 bytes saved thanks to string compression, courtesy of @Adnan

##05AB1E, 51 42 bytes##

2ô¤ï<•r–ºþ¯Bê€õaPù£—^5AºüLwÇ–è•35B3ôsès1èJ

Explanation

                                           # implicit input, 123405
2ô                                         # split input into pieces of 2, ['12','34''05']
  ¤ï                                       # get the last piece as int, 5
    <                                      # decrease by 1 to get index of month, 4
     •r–ºþ¯Bê€õaPù£—^5AºüLwÇ–è•35B         # get compressed string containing 3-letter months, 
                                             JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC
                                  3ô       # split into pieces of 3
                                             ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC']
                                    sè     # get month at index retrieved earlier, MAY
                                      s1è  # get last 2 digits of year, 34
                                         J # join and implicitly print, MAY34

9 bytes saved thanks to string compression, courtesy of @Adnan

##05AB1E, 51 42 bytes##

2ô¤ï<•r–ºþ¯Bê€õaPù£—^5AºüLwÇ–è•35B3ôsès1èJ

Explanation

                                           # implicit input, 123405
2ô                                         # split input into pieces of 2, ['12','34''05']
  ¤ï                                       # get the last piece as int, 5
    <                                      # decrease by 1 to get index of month, 4
     •r–ºþ¯Bê€õaPù£—^5AºüLwÇ–è•35B         # get compressed string containing 3-letter months, 
                                             JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC
                                  3ô       # split into pieces of 3
                                             ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC']
                                    sè     # get month at index retrieved earlier, MAY
                                      s1è  # get last 2 digits of year, 34
                                         J # join and implicitly print, MAY34

Try it online

9 bytes saved thanks to string compression, courtesy of @Adnan

added 969 characters in body
Source Link
Emigna
  • 53k
  • 5
  • 43
  • 162
Loading
added 67 characters in body
Source Link
Emigna
  • 53k
  • 5
  • 43
  • 162
Loading
Source Link
Emigna
  • 53k
  • 5
  • 43
  • 162
Loading