[FIX] fixed dates.js
bzr revid: fme@openerp.com-20110512143835-16l5c3ajj36l4nrn
This commit is contained in:
parent
50194d321e
commit
6b09377f4f
|
@ -96,7 +96,7 @@ var fts = function(str, size) {
|
||||||
* @returns {String} A string representing a datetime.
|
* @returns {String} A string representing a datetime.
|
||||||
*/
|
*/
|
||||||
openerp.base.format_datetime = function(obj) {
|
openerp.base.format_datetime = function(obj) {
|
||||||
if(! str) {
|
if (!obj) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return fts(obj.getUTCFullYear(),4) + "-" + fts(obj.getUTCMonth() + 1,2) + "-"
|
return fts(obj.getUTCFullYear(),4) + "-" + fts(obj.getUTCMonth() + 1,2) + "-"
|
||||||
|
@ -112,7 +112,7 @@ openerp.base.format_datetime = function(obj) {
|
||||||
* @returns {String} A string representing a date.
|
* @returns {String} A string representing a date.
|
||||||
*/
|
*/
|
||||||
openerp.base.format_date = function(obj) {
|
openerp.base.format_date = function(obj) {
|
||||||
if(! str) {
|
if (!obj) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return fts(obj.getFullYear(),4) + "-" + fts(obj.getMonth() + 1,2) + "-"
|
return fts(obj.getFullYear(),4) + "-" + fts(obj.getMonth() + 1,2) + "-"
|
||||||
|
@ -127,11 +127,11 @@ openerp.base.format_date = function(obj) {
|
||||||
* @returns {String} A string representing a time.
|
* @returns {String} A string representing a time.
|
||||||
*/
|
*/
|
||||||
openerp.base.format_time = function(obj) {
|
openerp.base.format_time = function(obj) {
|
||||||
if(! str) {
|
if (!obj) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return fts(obj.getHours(),2) + ":" + fts(obj.getMinutes(),2) + ":"
|
return fts(obj.getHours(),2) + ":" + fts(obj.getMinutes(),2) + ":"
|
||||||
+ fts(obj.getSeconds(),2);
|
+ fts(obj.getSeconds(),2);
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue