getItemValueDateTimeArray (NotesDocument - JavaScript)

文書内の日付/時刻のアイテムの値を返します。

定義場所

NotesDocument

構文

getItemValueDateTimeArray(name:string) : java.util.Vector
パラメータ 説明
String name 日付/時刻アイテムの名前です。
戻り値 説明
java.util.Vector アイテムに含まれる値 (複数の場合もあり)。ベクトルのそれぞれの要素は、アイテムの値に相当し、NotesDateTime または NotesDateRange 型です。 アイテムに値が 1 つしか含まれていない場合、ベクトルに含まれる要素は 1 つだけです。

使用法

それぞれの要素のクラスを typeof で判別できます。クラス名は、DateTime または DateRange で終わります。

このボタンは、現在の文書内の日付/時刻のアイテムの値を取得します。
try {

var itemname:string = "times";
var doc:NotesDocument = currentDocument.getDocument();
if (doc.hasItem(itemname)) {
	var itemvalue:java.util.Vector = doc.getItemValueDateTimeArray(itemname);
	var iterator = itemvalue.iterator();
	while (iterator.hasNext()) {
		var itemvalue1 = iterator.next();
		if ((typeof(itemvalue1)).endsWith("DateTime")) {
			requestScope.status += "¥nTime: " + itemvalue1.getLocalTime();
		} else if ((typeof(itemvalue1)).endsWith("DateRange")) {
			requestScope.status += "¥nStart: " + itemvalue1.getStartDateTime().getLocalTime();
			requestScope.status += "¥nEnd: " + itemvalue1.getEndDateTime().getLocalTime();
		}
	}
}

} catch(e) {
	requestScope.status += "¥n" + e.toString()
}

言語間の参照

LotusScript® NotesDocument クラスの GetItemValueDateTimeArray メソッド

Java™ Document クラスの getItemValueDateTimeArray メソッド