Domino Code Fragment
Code Name* AMString, isDST, isTime24Hour, PMString, TimeSep, and TimeZone properties | Date* 04/28/2024 | Source (or email address if you prefer)* Rlatulippe@romac.com IP address:.3.144.71.142 | |
Description* This agent displays international time settings: 24-hour or 12-hour; for 12-hour, the AM and PM strings; the hour-minute-second separator; and the time zone. | Type* Java | Categories* Date/Time Handling |
Implementation: | Required Client: | Server: |
Limitations: | Comments: |
public class amstringagent extends AgentBase
{
public void NotesMain()
{
try
{
Session s = getSession();
International inat = s.getInternational();
if (inat.isTime24Hour())
System.out.println("Time format is 24-hour");
else {
System.out.println("Time format is 12-hour");
System.out.println("AM notation is \"" +
inat.getAMString() + "\"");
System.out.println("PM notation is \"" +
inat.getPMString() + "\"");
}
System.out.println("Time separator is \"" +
inat.getTimeSep()+ "\"");
System.out.println("Time zone is " +
inat.getTimeZone());
}
catch (Exception e)
{
e.printStackTrace();
}
}
}