pingjiang / datejs

Automatically exported from code.google.com/p/datejs
Other
0 stars 0 forks source link

last(), next() doesn't function properly. #77

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
last() and next() gives out 'undefined', though is() is working out well as
expected.

function processAjaxRequests()
{
var leDate = '22-June-2009';
//var leDate =
'1-'+document.getElementById('month').value+'-'+document.getElementById('year').
value

    if(Date.parse(leDate).is().monday()==true)
    {
        alert('monday:'+Date.today().last().monday());
    }
    else
    {
        alert('else:'+Date.parse(leDate).next().monday());
    }

}

Original issue reported on code.google.com by ss.mai...@gmail.com on 22 Jun 2009 at 6:55

GoogleCodeExporter commented 9 years ago
Can you confirm if you're using the latest code from svn? 
(http://www.datejs.com/svn/)

When I run Date.today().last().monday() it appears to return the correct 
result. 

Original comment by geoff%co...@gtempaccount.com on 22 Jun 2009 at 7:26

GoogleCodeExporter commented 9 years ago
Yes, I am running the current code from svn.

Found out that, if i keep the date.js in same folder where the asp files reside 
error
doesn't occur. if i keep somewhere else and map it this error occurs.

Original comment by ss.mai...@gmail.com on 22 Jun 2009 at 9:21

GoogleCodeExporter commented 9 years ago
Apologies for posting this as a issue. Found out that datepicker.js is 
conflicting
with the same function name. Found out and corrected myself.

Thanks for great help!

Original comment by ss.mai...@gmail.com on 22 Jun 2009 at 11:57

GoogleCodeExporter commented 9 years ago

Original comment by geoff%co...@gtempaccount.com on 13 Jul 2009 at 6:40