JAVA/CORBA クラス


例:AMString プロパティ、isDST プロパティ、isTime24Hour プロパティ、PMString プロパティ、TimeSep プロパティ、TimeZone プロパティ
次のエージェントは、国別の時刻設定 (24 時間制または 12 時間制、12 時間ごとの AM または PM 文字列、時:分:秒の区切り文字 (セパレータ)、およびタイムゾーンなど) を表示します。

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();
}
}
}

関連項目