|
|
|
Wednesday, 07 April 2010 12:59 |
// Last two functions are used to create a correct date object from a UK date string
function FormatMinutesFromHours(time) {
// Create a new date object so we can play with the time correctly
var newDate = CreateFullDate("01/01/1900", time);
// Get the decimal value of minutes
var decimalTime = newDate.getHours() + (newDate.getMinutes() / 60);
// Multiply by 60 and round to get the correct number of minutes
return Math.round(decimalTime * 60);
}
function CreateFullDate(dateStr, TimeStr) {
// Convert into a uk date object
var formatUK = FormatUkDate(dateStr);
// Next take the uk date object and convert into an american date string!
var formatUS = formatUK.format("MM/dd/yyyy");
// Create a new date object from the american date and time
return new Date(formatUS + " " + TimeStr);
}
function FormatUkDate(dateStr) {
dateStr = dateStr.split("/");
return new Date(dateStr[2], dateStr[1] - 1, dateStr[0]);
}
 Read more: |
|
|
Wednesday, 07 April 2010 12:56 |
// Creates a date object from a date string and a time string. Has to convert into an american format so that the date object holds the correct date
function CreateFullDate(dateStr, TimeStr) {
// Convert into a uk date object
var formatUK = FormatUkDate(dateStr);
// Next take the uk date object and convert into an american date string!
var formatUS = formatUK.format("MM/dd/yyyy");
// Create a new date object from the american date and time
return new Date(formatUS + " " + TimeStr);
}
function FormatUkDate(dateStr) {
dateStr = dateStr.split("/");
return new Date(dateStr[2], dateStr[1] - 1, dateStr[0]);
}
 Read more: |
|
Sunday, 28 March 2010 12:28 |
To create multiple copies of an object place the object in an array and multiply it by the number of objects required e.g.
["as"] * 4
#=> ["as", "as", "as", "as"]
 Read more: |
|
|
Thursday, 28 January 2010 06:00 |
 | About Harlequin Presents: Hidden Object of Desire
Allie's on a quest to find some breaking news in the Kingdom of Adamas, but must now choose between her friend's well-being and true love! The bachelor Prince of Aristo is the most enchanting man she has ever met, but she must fend off his charming advances long enough to figure out what is going on. Help Allie find valuable clues in Harlequin Presents: Hidden Object of Desire, an exciting Hidden Object game. |
Read more: |
|
|
|
|
Page 2 of 2 |