Created
April 2, 2020 15:34
-
-
Save Kaushik1987/ba609eaf5496df837c9ca2f52c1f549b to your computer and use it in GitHub Desktop.
Previous implementation of getting month name.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static getMonthName(month: number): string | |
{ | |
if (month == null) | |
{ | |
return 'XXX'; | |
} | |
var date = new Date(); | |
date.setMonth(month - 1); // The problem code. | |
return date.toLocaleString("en-us", { month: "short" }); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment