UNPKG

@js-smart/react-kit

Version:
23 lines (22 loc) 859 B
/** * Sets Cookie expiration to 24 hours. By default, server sets 60 minutes expiration but after each API request it extends to another 60 minutes. In client side set 24 hours as expiration date, * if the user hasn't refreshed web page in 60 minutes, they would get HTTP 401 isError and redirected to login page. And redirect URL will be stored in cookie * * @author Pavan Kumar Jadda * @since 0.2.30 */ export declare const setCookieExpirationDate: () => Date; /** * Convert String format browser Date Time to ISO Date * * @author Pavan Kumar Jadda * @since 0.2.30 */ export declare const convertToIsoDate: (currentDateTime: string) => string; /** * Convert String format browser Date Time to ISO Date * * @author Pavan Kumar Jadda * @since 0.2.30 */ export declare const formatDate: (date: string | undefined, newFormat: string) => string;