Skip to content

CURRENT_MILLISECOND #309116

@mfulton26

Description

@mfulton26

I like how a snippet can insert CURRENT_SECOND, I'd also like current millisecond. Can CURRENT_MILLISECOND be added as well please?

It would be defined as "the current millisecond as three digits".

Example use case: Entering current ISO 8601 formatted date-time:

{
	"Insert DateTime": {
		"prefix": "dt",
		"body": [
			"${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE}T${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}.${CURRENT_MILLISECOND}${CURRENT_TIMEZONE_OFFSET}"
		]
	}
}

A CURRENT_MILLISECONDS_UNIX could also be helpful defined as "the number of milliseconds since the Unix epoch" (similar to CURRENT_SECONDS_UNIX but with millisecond precision).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions