Tips and Tricks in a world of Mix

150 countries globalization

A variety of functions – including first day of week , comparison et cetera .

Download updated library (from 2008) at this address.

APIvery useful and simple.

(Maybe a bit old date on the update of the library , but very effective.. )



cellDateTime comes from wcf in format of



after a small extension usage of :


String.prototype.DateWCF = function (dateformat) {
    return new Date(parseInt(this.match(/\/Date\(([0-9]+)(?:.*)\)\//)[1])).format(dateformat);


cellDateTime.DateWCF(‘dd/mm/yyyy HH:MM’)


Usage of date-he-IL.js :

<script src="scripts/infrastructure/date/date-he-IL.js" type="text/javascript"></script>

///parse from string

  if (m == 0) {
  firstDateOfWeek = Date.parse(currentCell.CellDateTime());
   ///if it’s not sunday , go to the last sunday 
if (Date.parse(currentCell.CellDateTime()).getDayName() != "Sunday")
                  firstDateOfWeek.moveToDayOfWeek(0, -1);

  //current date of the cell – first date + j index of the number of days loop
var checkedDate = firstDateOfWeek.clone().add(j).days();

if (, Date.parse(currentCell.CellDateTime())) == 0) {
                      //if the date exists get out and check next date
IsCellExistsForCheckedDate = true;


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Tag Cloud

%d bloggers like this: