This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Apr 12, 2013, 2:36 AM
21 Posts

Problem with adjustDay in Javascript

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.3
  • Role:
  • Tags: adjustday
  • Replies: 1
I try to get firstday of the month and end day of the month using the code below. 

If 'RentalStart' is March, the outcome suppose to be 1/3/2013 and 31/3/2013 

But what I am getting is 1/3/2013 and 28/3/2013 

Can anybody tell me is this a bugs or my script below is wrong... 

 ======================================================

tmpdate=getComponent("RentalStart").getValue();
var s1:NotesDateTime = session.createDateTime(tmpdate);

 document1.setValue("RentalFrom",s1.getDateOnly());
s1.adjustDay(-1);
s1.adjustMonth(1);
document1.setValue("RentalUntil",s1.getDateOnly());

========================================================


Thank you in advance to you guys... 
Apr 17, 2013, 2:21 AM
21 Posts
Re: Problem with adjustDay in Javascript
 Anybody can help me? 

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal