scriptable-testlab
Version:
A lightweight, efficient tool designed to manage and update scripts for Scriptable.
40 lines (37 loc) • 945 B
TypeScript
import { AbsDateFormatter } from 'scriptable-abstract';
/**
* Mock implementation of Scriptable's DateFormatter
* Used to format dates into strings and parse strings into dates
*/
declare class MockDateFormatter extends AbsDateFormatter {
constructor();
/**
* Gets the locale identifier
*/
get locale(): string;
/**
* Sets the locale identifier
*/
set locale(value: string);
/**
* Gets the custom date format string
*/
get dateFormat(): string;
/**
* Sets the custom date format string
*/
set dateFormat(value: string);
/**
* Formats a date into a string
* @param date Date to format
* @returns Formatted date string
*/
string(date: Date): string;
/**
* Parses a string into a date
* @param dateString String to parse
* @returns Parsed date
*/
date(dateString: string): Date;
}
export { MockDateFormatter };