Commerce Module Migration to TypeScript

SuiteCommerce Advanced (SCA) source code is being migrated to TypeScript in phases. TypeScript is an open source superset of JavaScript designed to optimize development efficiency. The code migration to TypeScript is ongoing and includes changes such as: Changing filename extension from .js to .ts Transforming module system from Asynchronous Module Definition (AMD) to a TypeScript… Continue reading Commerce Module Migration to TypeScript

How to avoid timezone offset shift when displaying a date input value in typescript

I was using javascript to show the date field in ‘mm-dd-yyyy’ format from the date input field in typescript. But since the input date value was only having the date and not time, when using the ‘new Date()’ function time was set to 00:00:00 hours GMT. This caused date to shift a day before in… Continue reading How to avoid timezone offset shift when displaying a date input value in typescript

How to display a date object as a date value in another timezone

In Javascript, the date object does not store any specific timezone value. The time is stored in the value of the local timezone relative to GMT(Greenwich Mean Time). If we print the time object, we can see that the time is represented as a value with a sign and offset from the UTC(Coordinated Universal Time)… Continue reading How to display a date object as a date value in another timezone

Different Timezone Abbreviations and Time Offset values for Date Object Creation

Following is a list of country codes, their timezone identifiers, the timezone offset in each of these regions with respect to UTC, and the standard Timezone abbreviations for each location. These are very useful when you want to convert the time object value in a specific time zone to a time object value in a… Continue reading Different Timezone Abbreviations and Time Offset values for Date Object Creation

TypeScript and JavaScript

TypeScript JavaScript A typed language that catches compilation errors early on You can find out errors during runtime Suitable for large projects as it improves code maintainability and readability As more code is added, becomes difficult to test and debug, thus JS is suitable for small projects Superset of JS, i.e., features like object-orientation, type-checking,… Continue reading TypeScript and JavaScript