Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Timestamp Format: 23.12.2015 08:34:50

//23.12.2015 08:34:50
var a = new Date().toString ();
var parts = a.split(" ");
var mon = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];

for (var i = 0; i < 12; i++){
    parts[1] = parts[1].replace(mon[i],i + 1);
}
parts[1] = parts[1].padStart(2,"0");
var TS = parts[2] + "." + parts[1] + "." + parts[3] + " " + parts[4];
Comment

PREVIOUS NEXT
Code Example
:: Copy an Array with the Spread Operator 
::  
::  
Javascript :: a7aad 
Javascript ::  
Javascript :: sintaxis map javascript 
Javascript ::  
Javascript ::  
::  
::  
Javascript :: returns string of names, seperated by commas and an ampersand namesObj in javascript 
Javascript ::  
:: submit file js 
Javascript ::  
::  
Javascript ::  
::  
:: binary function 
::  
:: Alternative Syntax For Backbone Simple Template 
Javascript ::  
::  
Javascript :: Backbone.model first parameter determines properties that each instance must have 
::  
Javascript ::  
::  
Javascript ::  
::  
::  
Javascript ::  
ADD CONTENT
Topic
Content
Source link
Name
2+2 =