Skip to content

Instantly share code, notes, and snippets.

View haziqfiqri's full-sized avatar
:octocat:
meow

Haziq haziqfiqri

:octocat:
meow
  • Kuala Lumpur, Malaysia
View GitHub Profile
@haziqfiqri
haziqfiqri / Code.gs
Created November 28, 2023 20:05
Google AppScript RSVP
function getDate() {
return new Date(new Date().toLocaleString('en', {timeZone: 'Asia/Kuala_Lumpur'}))
}
function formatTelephone(telephone) {
if (telephone.startsWith("+6")) {
return telephone.substring(1);
} else if (telephone.startsWith("0")) {
return "6" + telephone;
} else if (telephone.startsWith("5")) { // +65 singapore