Advertisement
leomaster

months

Oct 23rd, 2017
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Object.assign(this,
  2.     {
  3.         months : [
  4.             ...[]
  5.                 .constructor(0xD)
  6.                 .keys``
  7.             ]
  8.             .slice(Boolean``)
  9.             .map(key =>
  10.                 new Date(
  11.                     `${key}`
  12.                         .replace(
  13.                             /(.*)/g ,
  14.                             `${'$&'
  15.                                 .repeat(~~Math.E)
  16.                                 .match(/../g)
  17.                             }`
  18.                         )
  19.                     )
  20.                     .toLocaleString(
  21.                         navigator.language.toLowerCase``,
  22.                         ['month long'
  23.                             .split(/\s/)]
  24.                             .map(
  25.                                     ([ key, val ]) =>
  26.                                             ({
  27.                                                 [key] : val
  28.                                             })
  29.                                 )
  30.                             .pop``)
  31.                 )
  32.     }
  33. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement