Compare commits

..

2 Commits

Author SHA1 Message Date
d328d47859 1.3.0
All checks were successful
Publish / Publish npm package action (push) Successful in 46s
2026-04-12 08:30:23 +03:00
39f32d02f9 feat: add timestamp to iso 2026-04-12 08:30:08 +03:00
3 changed files with 7 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@teacinema/common", "name": "@teacinema/common",
"version": "1.2.0", "version": "1.3.0",
"description": "Common library for TeaCinema microservices", "description": "Common library for TeaCinema microservices",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",

View File

@ -1 +1,2 @@
export * from './convert-enum.util' export * from './convert-enum.util'
export * from './timestamp-to-iso.util'

View File

@ -0,0 +1,5 @@
import { Timestamp } from '@teacinema/contracts/gen/ts/google/protobuf/timestamp'
export function timestampToISO(ts: Timestamp) {
new Date(ts.seconds * 1000 + ts.nanos / 1_000_000).toISOString()
}