Domino Code Fragment
Code Name* AdjustMonth method | Date* 04/28/2024 | Source (or email address if you prefer)* Rlatulippe@romac.com IP address:.3.138.110.119 | |
Description* This agent decrements the date by 10 months. | Type* Java | Categories* Date/Time Handling |
Implementation: | Required Client: | Server: |
Limitations: | Comments: |
public class adjustmonthagent extends AgentBase
{
public void NotesMain()
{
try
{
Session s = getSession();
DateTime dt = s.createDateTime("");
dt.setNow();
System.out.println("Today: " + dt.getLocalTime());
dt.adjustMonth(-10, true);
System.out.println("Ten months ago: " + dt.getLocalTime());
}
catch (Exception e)
{
e.printStackTrace();
}
}
}