UNPKG

@hello.nrfcloud.com/proto

Version:

Documents the communication protocol between the hello.nrfcloud.com backend and the web application

11 lines (10 loc) 452 B
import { Type } from '@sinclair/typebox'; export var IsoDateType = function(description) { return Type.String({ pattern: '^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2}(?:.[0-9]*)?)(([+-]([0-9]{2}):([0-9]{2})|Z)?)$', description: description !== null && description !== void 0 ? description : 'A date formatted as an ISO 8601 string', examples: [ new Date().toISOString() ] }); };