From 3154dac50ec9912ebd4a69556e79277233add415 Mon Sep 17 00:00:00 2001 From: aswamy93 <92323937+aswamy93@users.noreply.github.com> Date: Thu, 3 Oct 2024 19:45:31 +0530 Subject: [PATCH] Create syntax editor for the sample code to get local date Generates a sample code to initiate GlideDateTime object and then call the helper function to get the current date as per user's time-zone --- GlideDateTime/getlocaldate.js | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 GlideDateTime/getlocaldate.js diff --git a/GlideDateTime/getlocaldate.js b/GlideDateTime/getlocaldate.js new file mode 100644 index 0000000..c772e29 --- /dev/null +++ b/GlideDateTime/getlocaldate.js @@ -0,0 +1,2 @@ +var gdt = new GlideDateTime();//Initiate the date time object for the current date & time +gdt.getLocalDate();//Gets the date stored by the date time object, expressed in the standard format, yyyy-MM-dd, and the current user's time zone