gDate2Cal 0.1

By Willem Spruijt Last update Aug 2, 2007 — Installed 1,942 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 4 posts, 4 voices



Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
Fabrizio Scriptwright

I modified the first few lines to add italian, then I got too lazy, seeing how hard would have been for me to add the date format suggested by Ash...
anyhow, this is my contribute...

var aRegExpMonthsEn = 'January|February|March|April|May|June|July|August|September|October|November|December';
var aRegExpMonthsNl = 'Januari|Februari|Maart|April|Mei|Juni|Juli|Augustus|September|Oktober|November|December';
var aRegExpMonthsIt = 'Gennaio|Febbraio|Marzo|Aprile|Maggio|Giugno|Luglio|Agosto|Settembre|Ottobre|Novembre|Dicembre';

var getMonthByStr = function(strMonth) {
if(strMonth == 'January' || strMonth == 'Januari' || strMonth == 'january' || strMonth == 'januari'|| strMonth == 'Gennaio'|| strMonth == 'gennaio') return '1';
if(strMonth == 'February' || strMonth == 'Februari' || strMonth == 'february' || strMonth == 'februari' || strMonth == 'Febbraio'|| strMonth == 'febbraio') return '2';
if(strMonth == 'March' || strMonth == 'Maart' || strMonth == 'march' || strMonth == 'maart' || strMonth == 'Marzo' || strMonth == 'marzo') return '3';
if(strMonth == 'April' || strMonth == 'april' || strMonth == 'Aprile'|| strMonth == 'aprile') return '4';
if(strMonth == 'May' || strMonth == 'Mei' || strMonth == 'may' || strMonth == 'mei' || strMonth == 'Maggio'|| strMonth == 'maggio') return '5';
if(strMonth == 'June' || strMonth == 'Juni' || strMonth == 'june' || strMonth == 'juni' || strMonth == 'Giugno'|| strMonth == 'giugno') return '6';
if(strMonth == 'July' || strMonth == 'Juli' || strMonth == 'july' || strMonth == 'juli' || strMonth == 'Luglio'|| strMonth == 'luglio') return '7';
if(strMonth == 'August' || strMonth == 'Augustus' || strMonth == 'august' || strMonth == 'augustus' || strMonth == 'Agosto'|| strMonth == 'agosto') return '8';
if(strMonth == 'September' || strMonth == 'september' || strMonth == 'Settembre'|| strMonth == 'settembre') return '9';
if(strMonth == 'October' || strMonth == 'Oktober' || strMonth == 'october' || strMonth == 'oktober' || strMonth == 'Ottobre'|| strMonth == 'ottobre') return '10';
if(strMonth == 'November' || strMonth == 'november' || strMonth == 'Novembre'|| strMonth == 'novembre') return '11';
if(strMonth == 'December' || strMonth == 'dedember' || strMonth == 'Dicembre'|| strMonth == 'dicembre') return '12';
}

 
Nathan Sudds User

This is definitely a helpful script, is there a way to prevent the script from converting dates in links though? I find that url's containing dates become "broken" causing email newsletters etc, to be jumbled like this...

Manuel Amador has detailed why he believes 2007/12/11/removal-of-ogg-vorbis-and-theora-from-html5-an-outrageous-disaster/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">the decision to omit these open formats to be an “outrageous disaster:”
(from a www.sitepoint.com newsletter)

Thanks

 
Styles Scriptwright

How about (UK style):
01/12/2007 (dd/mm/yyyy)
01/12 (dd/mm)
1/12/2007 (d/mm/yyyy)
1/12 (d/mm)
1/12/07 (d/mm/yy)
and the same with hyphens instead of slashes?

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel