Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

uppercase months

Jason Kent5c8b76ae76cd
diff --git a/web/js/components/layer/info/info.js b/web/js/components/layer/info/info.js
index f1f288240..9b66acef2 100644
--- a/web/js/components/layer/info/info.js
+++ b/web/js/components/layer/info/info.js
@@ -4,10 +4,6 @@ import { dateOverlap } from '../../../modules/layers/util';
import DateRanges from './date-ranges';
import util from '../../../util/util';
-function configureTemporalDate(dateType, date, period) {
- return util.coverageDateFormatter(dateType, date, period);
-}
-
export default function LayerInfo ({ layer, measurementDescriptionPath }) {
const {
dateRanges,
@@ -63,13 +59,13 @@ export default function LayerInfo ({ layer, measurementDescriptionPath }) {
<span id={`${id}-startDate`} className="layer-date-start">
{startDate
? `Temporal coverage: ${
- configureTemporalDate('START-DATE', startDate, period)}`
+ util.coverageDateFormatter('START-DATE', startDate, period)}`
: ''}
</span>
<span id={`${id}-endDate`} className="layer-date-end">
{startDate && endDate
? ` - ${
- configureTemporalDate('END-DATE', endDate, period)}`
+ util.coverageDateFormatter('END-DATE', endDate, period)}`
: startDate
? ' - Present'
: ''}
diff --git a/web/js/util/util.js b/web/js/util/util.js
index 0f50f1a87..3381ee5c8 100644
--- a/web/js/util/util.js
+++ b/web/js/util/util.js
@@ -234,7 +234,7 @@ export default (function(self) {
const parsedDate = this.parseDate(date);
switch (period) {
case 'subdaily':
- dateString = `${moment(parsedDate).format('YYYY MMMM DD HH:mm')}Z`;
+ dateString = `${moment(parsedDate).format('YYYY MMMM DD HH:mm')}Z`.toUpperCase();
break;
case 'yearly':
@@ -244,11 +244,11 @@ export default (function(self) {
case 'monthly':
if (dateType === 'END-DATE') parsedDate.setMonth(parsedDate.getMonth() - 1);
- dateString = moment(parsedDate).format('YYYY MMM');
+ dateString = moment(parsedDate).format('YYYY MMM').toUpperCase();
break;
default:
- dateString = moment(parsedDate).format('YYYY MMM DD ');
+ dateString = moment(parsedDate).format('YYYY MMM DD ').toUpperCase();
break;
}