You are not logged in.

#1 2011-07-23 18:55:00

vincekd
Member
From: USA
Registered: 2011-02-27
Posts: 15

DjScript- javascript Date library for web or seed/node/gjs

I wrote this date library because I was working with dates a lot and the native Date object is horrible for formatting or date parsing.

As it is now, it can be used on a website without any modification, but if you want to use it in a non-web setting, you'll have to tweak it a bit.  For example, to use with node.js, just add "export.date = date;" at the top of the script.

Basic syntax is almost exactly like the date() function in php. 

"date ( 'H:i:sA Y_m_d', 'june 23rd 2004 5:15:33pm' ); " yields the output "05:15:33PM 2004_06_23".

You can get it at my website or on Github.

My website includes a space to try it out.  Let me know if there are any improvements you'd like to see and I'll work on it.

Last edited by vincekd (2011-07-24 05:13:19)

Offline

Board footer

Powered by FluxBB