Domino Code Fragment
Code Name* DateSep, isDateDMY, isDateMDY, isDateYMD, Today, Tomorrow, and Yesterday properties | Date* 04/28/2024 | Source (or email address if you prefer)* Rlatulippe@romac.com IP address:.18.191.195.110 | |
Description* This agent displays the date international settings: whether the date format is DMY, MDY, or YMD; the month-day-year separator; the keywords for yesterday, today, and tomorrow. | Type* Java | Categories* Date/Time Handling |
Implementation: | Required Client: | Server: |
Limitations: | Comments: |
public class datesepagent extends AgentBase
{
public void NotesMain()
{
try
{
Session s = getSession();
boolean except = false;
International inat = s.getInternational();
if (inat.isDateDMY())
System.out.println
("Format of date is \"DMY\"");
if (inat.isDateMDY())
System.out.println
("Format of date is \"MDY\"");
if (inat.isDateYMD())
System.out.println
("Format of date is \"YMD\"");
System.out.println
("Date separator is \"" + inat.getDateSep() + "\"");
System.out.println
("Text of date keywords: " +
inat.getYesterday() + ", " +
inat.getToday() + ", " +
inat.getTomorrow());
}
catch (Exception e)
{
e.printStackTrace();
}
}
}