export class Timestamp { protected constructor ( private readonly date ) { } static now ( ) { return new Timestamp ( new Date ( ) . toISOString ( ) ) ; } static fromString ( isoString ) { return new Timestamp ( new Date ( isoString ) . toISOString ( ) ) ; } toString ( ) { return this . date ; } }