# unixSeconds

Industry: Core

```ts
const unixSeconds: RegExp = /^\d{10}$/;
```

RegExp matching a Unix timestamp in seconds: exactly 10 digits.

## Examples

```ts
import { unixSeconds } from "@northguild/gmt";
```

```ts
unixSeconds.test("1710511800") // true
unixSeconds.test("0000000000") // true (epoch)
unixSeconds.test("9999999999") // true (2286-11-20T17:46:39Z)
unixSeconds.test("999999999") // false (unpadded; 2001-09-09T01:46:39Z)
unixSeconds.test("-1") // false (negative)
unixSeconds.test("17105118001") // false (11 digits)
```

## Source

[regex/unix.ts](https://github.com/northguild/gmt/blob/main/packages/gmt/src/regex/unix.ts)
