# isValidFixUtcTimestamp

Industry: Finance

:::caution[Unreleased]
Not in `@northguild/gmt` 1.21.0 on npm yet. It is on `main` and ships in the next release.
:::

## Signature

```ts
isValidFixUtcTimestamp(value: string): boolean
isValidFixUtcTimestamp(value: void | {} | null | undefined): boolean
isValidFixUtcTimestamp(value: unknown): value is string
```

Return true when `value` is a FIX `UTCTimestamp` that states a real UTC second.

- True exactly when `parseFixUtcTimestamp` returns a value for the same argument: the validator calls the parser, so the two cannot disagree.
- Checks the calendar and the leap-second table as well as the shape: 30 February, hour 24 and a `60` on a day with no inserted leap second are false. For the shape of an ISO second 60 alone, `hasSecond60`; for an ISO leap second, `isLeapSecond`.
- A fraction of 3, 6, 9 or 12 digits, or none; any other width is false (FIX Latest: other widths are "with bilateral agreement", which a value does not carry).
- A value that is not a string, a `String` object included, returns false. A true result narrows an `unknown` value to `string`.

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `value` | `string` | any value; a string is checked as a FIX `UTCTimestamp` (e.g. "20240615-14:30:00.123") |

## Returns

boolean indicating validity

## Examples

```ts
import { isValidFixUtcTimestamp } from "@northguild/gmt/finance/validate";

isValidFixUtcTimestamp("20240615-14:30:00.123") // true
```

## Source

[finance/validate/isValidFixUtcTimestamp.ts](https://github.com/northguild/gmt/blob/main/packages/gmt/src/finance/validate/isValidFixUtcTimestamp.ts)
