galvanist · Mar 6, 2014
Javascript Date from Python datetime string representation
0Sign in to vote or save
This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.
In a recent project I needed to convert the string representation of a Python datetime.datetime into a Javascript Date object. Here’s what I came up with. JavaScript isn’t my best language so if you have any suggestions for improvement, please let me know. 
 function datetimeToDate ( datetime_str , use_utc ) { 
 // Return a JS Date object from the given python datetime_str…
Read on /posts/2014-03-06-javascript-date-from-python-datetime-string-representation/ ↗
Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.