From 683a463333639e64a69dde18f8dba53f84aafd8b Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 21 Aug 2015 18:28:42 -0700 Subject: [PATCH] Fixed types for 'globalization.dateToString' in 'cordova'. --- cordova/plugins/Globalization.d.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cordova/plugins/Globalization.d.ts b/cordova/plugins/Globalization.d.ts index bb9cd2f4a..f49e2bf4b 100644 --- a/cordova/plugins/Globalization.d.ts +++ b/cordova/plugins/Globalization.d.ts @@ -41,12 +41,17 @@ interface Globalization { * @param onError Called on error with a GlobalizationError object. * The error's expected code is GlobalizationError.FORMATTING_ERROR. * @param options Optional format parameters. Default {formatLength:'short', selector:'date and time'} + * - 'formatLength' can be "short", "medium", "long", or "full". + * - 'selector' can be "date", "time", or "date and time". */ dateToString( date: Date, onSuccess: (date: { value: string; }) => void, onError: (error: GlobalizationError) => void, - options?: { type?: string; item?: string; }): void; + options?: { + formatLength?: string; // "short" | "medium" | "long" | "full" + selector?: string; // "date" | "time" | "date and time" + }): void; /** * Parses a date formatted as a string, according to the client's user preferences * and calendar using the time zone of the client, and returns the corresponding date object.