Welcome To Snipplr


Everyone's Recent Snippets Tagged date



Insert that into the database as a string. The example would give you the format 2011-01-28
0 1590 posted 14 years ago by necode
Translate dates in french in JavaScript
0 1714 posted 14 years ago by jbernus
0 1204 posted 14 years ago by retsub79
I was working on a project where the timestamp string I was getting from the backend developer was pretty dirty in the way it was formatted. For example, it looked like "/Date(1310127448000+0100)/". I needed to get a nicely formatted time from it in...
0 1869 posted 14 years ago by adrianparr
Wanna lose the time portion of the date something was created in a smart search result!?!?
0 1319 posted 14 years ago by inreflection7
0 1475 posted 14 years ago by vagrantradio
Allows you to display a look like 5 days ago.
0 1504 posted 14 years ago by paulund
Extend Date object to have isLeapYear() boolean (true for Leap Years) Taken from https://raw.github.com/vitch/jquery-methods/master/date.js
0 1162 posted 14 years ago by tomasdev
0 1277 posted 14 years ago by stancox
You don't modify the CMSDesk in order to display only the date or only the time. You do it through the aspx control. http://authors.aspalliance.com/aspxtreme/sys/globalization/demos/DateTimeFormatInfoGetAllDateTimePatterns.aspx
0 3435 posted 14 years ago by inreflection7
Format a date into a string using several string variables. Usage: (new Date("6/6/2011")).format("%W, %B %d%o, %Y"); Result: Monday, June 6th, 2011
0 1661 posted 14 years ago by wizard04
The datetime_field value in the database is '0000-00-00 00:00:00'.
0 1178 posted 14 years ago by dsoms
0 1463 posted 14 years ago by ragnarokkrr
A simple C# function to take a standard DateTime and convert it to a pretty string saying how many seconds/minutes/days/weeks/months ago the date was, it doesn't return an actual date, but that wouldn't be hard to change the month/week/day section to...
2 1658 posted 14 years ago by Maelstrom
0 1163 posted 14 years ago by kendsnyder
Ridiculously comprehensive date validation regex - matches dd/mm/yyyy or dd/mm/yy. Also correctly matches number of days in months. ie. it won't match 30th Feb...
0 3502 posted 14 years ago by shodan_uk
Example: April 5th, 2011
0 1213 posted 14 years ago by trusktr
Returns the number of days in the month taking leap-years into account.
0 1385 posted 14 years ago by tasmanweb
0 1082 posted 14 years ago by zealmurapa
0 1145 posted 14 years ago by dsoms
0 1039 posted 14 years ago by linkmoises
This simple function allows you to find a weeks position in the month based on a given date. For instance I needed to alert the user their date was the "Second Week Of January" during a given month. I may never use it again but it came in very hand...
0 4184 posted 14 years ago by aristoworks
0 6282 posted 14 years ago by mecha