mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-20 01:22:52 +08:00
refactor(Globalization):
This commit is contained in:
parent
31ec643126
commit
be3c579c49
@ -1,4 +1,4 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Globalization
|
* @name Globalization
|
||||||
@ -23,14 +23,14 @@ export class Globalization {
|
|||||||
* @return {Promise<{value: string}>}
|
* @return {Promise<{value: string}>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getPreferredLanguage(): Promise<{value: string}> {return; }
|
static getPreferredLanguage(): Promise<{value: string}> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the BCP 47 compliant locale identifier string to the successCallback with a properties object as a parameter.
|
* Returns the BCP 47 compliant locale identifier string to the successCallback with a properties object as a parameter.
|
||||||
* @return {Promise<{value: string}>}
|
* @return {Promise<{value: string}>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getLocaleName(): Promise<{value: string}> {return; }
|
static getLocaleName(): Promise<{value: string}> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts date to string
|
* Converts date to string
|
||||||
@ -40,9 +40,9 @@ export class Globalization {
|
|||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 2
|
errorIndex 2
|
||||||
})
|
})
|
||||||
static dateToString(date: Date, options: {formatLength: string, selector: string}): Promise<{value: string}> {return; }
|
static dateToString(date: Date, options: {formatLength: string, selector: string}): Promise<{value: string}> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -53,8 +53,7 @@ export class Globalization {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
static stringToDate(dateString: string, options: {formatLength: string, selector: string}): Promise<{year: number, month: number, day: number, hour: number, minute: number, second: number, millisecond: number}> {return; }
|
static stringToDate(dateString: string, options: {formatLength: string, selector: string}): Promise<{year: number, month: number, day: number, hour: number, minute: number, second: number, millisecond: number}> { return; }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -63,8 +62,7 @@ export class Globalization {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
static getDatePattern(options: {formatLength: string, selector: string}): Promise<{pattern: string}> {return; }
|
static getDatePattern(options: {formatLength: string, selector: string}): Promise<{pattern: string}> { return; }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -73,20 +71,20 @@ export class Globalization {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
static getDateNames(options: {type: string, item: string}): Promise<{value: Array<string>}> {return; }
|
static getDateNames(options: {type: string, item: string}): Promise<{value: Array<string>}> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if day light saving is active
|
* Check if day light saving is active
|
||||||
* @param date
|
* @param date
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isDayLightSavingsTime(date: Date): Promise<{dst: string}> {return; }
|
static isDayLightSavingsTime(date: Date): Promise<{dst: string}> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get first day of week
|
* Get first day of week
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getFirstDayOfWeek(): Promise<{value: string}> {return; }
|
static getFirstDayOfWeek(): Promise<{value: string}> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -96,7 +94,7 @@ export class Globalization {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
static numberToString(options: {type: string}): Promise<{value: string}> {return; }
|
static numberToString(options: {type: string}): Promise<{value: string}> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -107,7 +105,7 @@ export class Globalization {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
static stringToNumber(stringToConvert: string, options: {type: string}): Promise<{value: number|string}> {return; }
|
static stringToNumber(stringToConvert: string, options: {type: string}): Promise<{value: number|string}> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -116,13 +114,13 @@ export class Globalization {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
static getNumberPattern(options: {type: string}): Promise<{pattern: string, symbol: string, fraction: number, rounding: number, positive: string, negative: string, decimal: string, grouping: string}> {return; }
|
static getNumberPattern(options: {type: string}): Promise<{pattern: string, symbol: string, fraction: number, rounding: number, positive: string, negative: string, decimal: string, grouping: string}> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param currencyCode
|
* @param currencyCode
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getCurrencyPattern(currencyCode: string): Promise<{pattern: string, code: string, fraction: number, rounding: number, decimal: number, grouping: string}> {return; }
|
static getCurrencyPattern(currencyCode: string): Promise<{pattern: string, code: string, fraction: number, rounding: number, decimal: number, grouping: string}> { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user