Format month with respect to JS value