JAVA/CORBA CLASSES


Examples: AMString, isDST, isTime24Hour, PMString, TimeSep, and TimeZone properties
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.

import lotus.domino.*;
public class JavaAgent extends AgentBase {
 public void NotesMain() {
   try {
     Session session = getSession();
     AgentContext agentContext = session.getAgentContext();
     // (Your code goes here)
     International inat = session.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());
     if (inat.isDST())
       System.out.println("Time reflects daylight-saving");
     else
       System.out.println(
       "Time does not reflect daylight-saving");
   } catch(Exception e) {
     e.printStackTrace();
   }
 }
}

See Also