@opengeoweb/sigmet-airmet 9.4.0 → 9.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.esm.js +4 -1
  2. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -2063,6 +2063,9 @@ var ObservationForecastTime = function ObservationForecastTime(_ref) {
2063
2063
  var _useFormContext = useFormContext(),
2064
2064
  watch = _useFormContext.watch;
2065
2065
  var label = getFieldLabel('Date and time', isReadOnly);
2066
+ var goZeroSeconds = function goZeroSeconds(val) {
2067
+ return moment.utc(val).seconds(0).milliseconds(0).toISOString();
2068
+ };
2066
2069
  var _useShortTestHelpers = useShortTestHelpers(),
2067
2070
  isShortTest = _useShortTestHelpers.isShortTest;
2068
2071
  var fieldsDisabled = isDisabled || isShortTest();
@@ -2080,7 +2083,7 @@ var ObservationForecastTime = function ObservationForecastTime(_ref) {
2080
2083
  return watch('isObservationOrForecast') === 'OBS' && val ? isBefore(val, moment.utc().format()) || 'Observation time cannot be in the future' : true;
2081
2084
  },
2082
2085
  isBetween: function isBetween$1(val) {
2083
- return watch('isObservationOrForecast') === 'FCST' && val ? isBetween(val, watch('validDateStart'), watch('validDateEnd')) || ForecastTimeValidation : true;
2086
+ return watch('isObservationOrForecast') === 'FCST' && val ? isBetween(goZeroSeconds(val), goZeroSeconds(watch('validDateStart')), goZeroSeconds(watch('validDateEnd'))) || ForecastTimeValidation : true;
2084
2087
  }
2085
2088
  }
2086
2089
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/sigmet-airmet",
3
- "version": "9.4.0",
3
+ "version": "9.5.0",
4
4
  "description": "GeoWeb Sigmet/Airmet library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {