or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

array.mdcollection.mddate.mdfunction.mdindex.mdlang.mdmath.mdnumber.mdobject.mdseq.mdstring.mdutil.md
tile.json

date.mddocs/

0

# Date Functions

1

2

Date and time utilities for timestamp operations.

3

4

## Capabilities

5

6

### Timestamp Utilities

7

8

```javascript { .api }

9

/**

10

* Gets the timestamp of the number of milliseconds that have elapsed since the Unix epoch

11

* @returns {number} Returns the timestamp

12

*/

13

function now();

14

```

15

16

## Usage Examples

17

18

```javascript

19

import { now } from "lodash-es";

20

21

// Get current timestamp

22

const timestamp = now(); // 1640995200000 (example)

23

24

// Useful for performance measurement

25

const start = now();

26

// ... some operation

27

const duration = now() - start;

28

console.log(`Operation took ${duration}ms`);

29

30

// Alternative to Date.now()

31

console.log(now() === Date.now()); // true (approximately)

32

```