Current date plugin

Does anybody know of a plugin that allows you to add current date in dd/mm/yy format in a textbox? I’ve just tried Powerful Tools, but only adds a random date. Thank you!

I don’t know if Figma Community has such a plugin, but you can use the open source plugin:

1 Like

@Gabriel_Leni With the Scripter plugin, you can use this code snippet to place the date into any selected text box.

for (const node of figma.currentPage.selection) {
	if (node.type === 'TEXT') {

		const date = new Date();

		// Edit this array to display months in a different format
		const monthArray = ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"];

		// This shortens the year to two digits
		const shortYear = date.getFullYear().toString().substr(-2);

	// Edit this to change the date format
	// Currently the format is XX/XX/XX
		node.characters = monthArray[date.getMonth()] + "/" + date.getDate() + "/" + shortYear;
	}
}
1 Like

Insteresting! Will this give a try…! Thanks a lot @ntfromchicago !

Brilliant! Will give this a look! :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.