timestamp = ->
  now = new Date()
  return (
        now.getFullYear() + '-' 
        + ("00" + (now.getMonth()+1)).substr(-2,2) + '-' 
        + ("00" + now.getDate()).substr(-2,2) + ' ' 
        + ("00" + now.getHours()).substr(-2,2) + ':' 
        + ("00" + now.getMinutes()).substr(-2,2) + ':' 
        + ("00" + now.getSeconds()).substr(-2,2) + '.' 
        + ("000" + now.getMilliseconds()).substr(-3,3)
  )

javascript pad strpad

[ ]
 

P.S. Присылайте криптовалюту если вам нравится то, что я делаю.
Если не нравится - тоже присылайте.
LTC (Litecoin): LLN6X2uV1iuQ1e4tdmQZsf2RRwh4pxPSej

Leave a Reply

*