diff --git a/setup.cfg b/setup.cfg
index 78d6b84c..c8c7e55b 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -3,13 +3,13 @@ current_version = 0.9-beta
 commit = True
 tag = True
 parse = (?P<major>\d+)\.(?P<minor>\d+)(\-(?P<release>[a-z]+))?
-serialize = 
+serialize =
 	{major}.{minor}-{release}
 	{major}.{minor}
 
 [bumpversion:part:release]
 optional_value = gamma
-values = 
+values =
 	beta
 	gamma
 
@@ -25,13 +25,14 @@ replace = __version__ = '{new_version}'
 universal = 1
 
 [flake8]
-exclude = 
+exclude =
 	.git,
 	docs,
-	build
+	build,
+    .eggs,
 max-line-length = 120
 max-complexity = 10
-ignore = 
+ignore =
 	F401
 	F403
 
@@ -41,6 +42,6 @@ test = pytest
 [tool:pytest]
 collect_ignore = ['setup.py']
 addopts = --verbose
-filterwarnings = 
+filterwarnings =
 	ignore::UserWarning
 
diff --git a/xclim/checks.py b/xclim/checks.py
index ec10cf38..212b6eec 100644
--- a/xclim/checks.py
+++ b/xclim/checks.py
@@ -147,7 +147,8 @@ def check_is_dataarray(comp):
     return func
 
 
-def missing_any(da, freq, **kwds):
+# This function can probably be made simpler once CFPeriodIndex is implemented.
+def missing_any(da, freq, **indexer):
     r"""Return a boolean DataArray indicating whether there are missing days in the resampled array.
 
     Parameters
@@ -156,19 +157,28 @@ def missing_any(da, freq, **kwds):
       Input array at daily frequency.
     freq : str
       Resampling frequency.
+    **indexer : {dim: indexer, }, optional
+      Time attribute and values over which to subset the array. For example, use season='DJF' to select winter values,
+      month=1 to select January, or month=[6,7,8] to select summer months. If not indexer is given, all values are
+      considered.
 
     Returns
     -------
     out : DataArray
       A boolean array set to True if any month or year has missing values.
     """
-    c = da.notnull().resample(time=freq).sum(dim='time')
+    from . import generic
 
     if '-' in freq:
         pfreq, anchor = freq.split('-')
     else:
         pfreq = freq
 
+    # Compute the number of days in the time series during each period at the given frequency.
+    selected = generic.select_time(da, **indexer)
+    c = selected.notnull().resample(time=freq).sum(dim='time')
+
+    # Otherwise simply use the start and end dates to find the expected number of days.
     if pfreq.endswith('S'):
         start_time = c.indexes['time']
         end_time = start_time.shift(1, freq=freq)
@@ -176,6 +186,22 @@ def missing_any(da, freq, **kwds):
         end_time = c.indexes['time']
         start_time = end_time.shift(-1, freq=freq)
 
+    if indexer:
+        # Create a full synthetic time series and compare the number of days with the original series.
+        t0 = str(start_time[0].date())
+        t1 = str(end_time[-1].date())
+        cal = da.time.encoding.get('calendar')
+        if cal:
+            t = xr.cftime_range(t0, t1, freq='D', calendar=cal)
+        else:
+            t = pd.date_range(t0, t1, freq='D')
+
+        sda = xr.DataArray(data=np.empty(len(t)), coords={'time': t}, dims=('time', ))
+        st = generic.select_time(sda, **indexer)
+        sn = st.notnull().resample(time=freq).sum(dim='time')
+        miss = sn != c
+        return miss
+
     n = (end_time - start_time).days
     nda = xr.DataArray(n.values, coords={'time': c.time}, dims='time')
     return c != nda
diff --git a/xclim/streamflow.py b/xclim/streamflow.py
index c176da23..34b6185e 100644
--- a/xclim/streamflow.py
+++ b/xclim/streamflow.py
@@ -30,7 +30,7 @@ class Stats(Streamflow):
         indexer = kwds['indexer']
         freq = kwds['freq'] or generic.default_freq(**indexer)
 
-        miss = (checks.missing_any(generic.select_time(da, **indexer), freq) for da in args)
+        miss = (checks.missing_any(da, freq, **indexer) for da in args)
         return reduce(np.logical_or, miss)
 
 

Implement missing check for specific periods (e.g. season=djf)
At the moment the missing function checks for all dates in the `freq`, even though we might only be interested in a given month. 
diff --git a/tests/test_checks.py b/tests/test_checks.py
index a0be5edb..9556a265 100644
--- a/tests/test_checks.py
+++ b/tests/test_checks.py
@@ -91,3 +91,29 @@ class TestMissingAnyFills:
         ts = tasmin_series(a)
         miss = checks.missing_any(ts, freq='A-JUN')
         np.testing.assert_equal(miss, [False])
+
+    def test_month(self, tasmin_series):
+        ts = tasmin_series(np.zeros(36))
+        miss = checks.missing_any(ts, freq='YS', month=7)
+        np.testing.assert_equal(miss, [False])
+
+        miss = checks.missing_any(ts, freq='YS', month=8)
+        np.testing.assert_equal(miss, [True])
+
+        miss = checks.missing_any(ts, freq='YS', month=[7, 8])
+        np.testing.assert_equal(miss, [True])
+
+        ts = tasmin_series(np.zeros(76))
+        miss = checks.missing_any(ts, freq='YS', month=[7, 8])
+        np.testing.assert_equal(miss, [False])
+
+    def test_season(self, tasmin_series):
+        ts = tasmin_series(np.zeros(360))
+        miss = checks.missing_any(ts, freq='YS', season='MAM')
+        np.testing.assert_equal(miss, [False])
+
+        miss = checks.missing_any(ts, freq='YS', season='JJA')
+        np.testing.assert_array_equal(miss, [True, True])
+
+        miss = checks.missing_any(ts, freq='YS', season='SON')
+        np.testing.assert_equal(miss, [False])
diff --git a/tests/test_streamflow.py b/tests/test_streamflow.py
index ddbec90e..7005c3e3 100644
--- a/tests/test_streamflow.py
+++ b/tests/test_streamflow.py
@@ -25,7 +25,6 @@ class TestStats():
         out = streamflow.stats(ndq_series, freq='YS', op='min', season='MAM')
         assert out.attrs['units'] == 'm^3 s-1'
 
-    @pytest.mark.skip()
     def test_missing(self, ndq_series):
         a = ndq_series
         a = ndq_series.where(~((a.time.dt.dayofyear == 5) * (a.time.dt.year == 1902)))

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov coveralls
apt-get update apt-get install -y gcc liblapack-dev libblas-dev libhdf5-serial-dev netcdf-bin libnetcdf-dev
3.6
requirements.txt requirements_dev.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==22.2.0
bleach==4.1.0
bokeh==2.3.3
boltons==23.1.1
Bottleneck==1.4.0
bump2version==1.0.1
bumpversion==0.6.0
certifi==2021.5.30
cffi==1.15.1
cftime==1.6.0
charset-normalizer==2.0.12
click==8.0.4
cloudpickle==2.2.1
colorama==0.4.5
contextvars==2.4
coverage==6.2
coveralls==3.3.1
cryptography==40.0.2
dask==2021.3.0
distlib==0.3.9
distributed==2021.3.0
docopt==0.6.2
docutils==0.18.1
filelock==3.4.1
flake8==5.0.4
fsspec==2022.1.0
HeapDict==1.0.1
idna==3.10
immutables==0.19
importlib-metadata==4.2.0
importlib-resources==5.4.0
iniconfig==1.1.1
jeepney==0.7.1
Jinja2==3.0.3
keyring==23.4.1
locket==1.0.0
MarkupSafe==2.0.1
mccabe==0.7.0
msgpack==1.0.5
netCDF4==1.6.2
numpy==1.19.5
packaging==21.3
pandas==1.1.5
partd==1.2.0
Pillow==8.4.0
Pint==0.17
pkginfo==1.10.0
platformdirs==2.4.0
pluggy==1.0.0
psutil==7.0.0
py==1.11.0
pycodestyle==2.9.1
pycparser==2.21
pyflakes==2.5.0
Pygments==2.14.0
pyparsing==3.1.4
pyproj==3.0.1
pytest==7.0.1
pytest-cov==4.0.0
pytest-runner==5.3.2
python-dateutil==2.9.0.post0
pytz==2025.2
PyYAML==6.0.1
readme-renderer==34.0
requests==2.27.1
requests-toolbelt==1.0.0
rfc3986==1.5.0
scipy==1.5.4
SecretStorage==3.3.3
six==1.17.0
sortedcontainers==2.4.0
tblib==1.7.0
toml==0.10.2
tomli==1.2.3
toolz==0.12.0
tornado==6.1
tox==3.28.0
tqdm==4.64.1
twine==3.8.0
typing_extensions==4.1.1
urllib3==1.26.20
virtualenv==20.16.2
watchdog==2.3.1
webencodings==0.5.1
xarray==0.16.2
-e git+https://github.com/Ouranosinc/xclim.git@fdb5bdcbdffb011aa394de794fec987e9422855a#egg=xclim
zict==2.1.0
zipp==3.6.0

name: xclim
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==22.2.0
      - bleach==4.1.0
      - bokeh==2.3.3
      - boltons==23.1.1
      - bottleneck==1.4.0
      - bump2version==1.0.1
      - bumpversion==0.6.0
      - cffi==1.15.1
      - cftime==1.6.0
      - charset-normalizer==2.0.12
      - click==8.0.4
      - cloudpickle==2.2.1
      - colorama==0.4.5
      - contextvars==2.4
      - coverage==6.2
      - coveralls==3.3.1
      - cryptography==40.0.2
      - dask==2021.3.0
      - distlib==0.3.9
      - distributed==2021.3.0
      - docopt==0.6.2
      - docutils==0.18.1
      - filelock==3.4.1
      - flake8==5.0.4
      - fsspec==2022.1.0
      - heapdict==1.0.1
      - idna==3.10
      - immutables==0.19
      - importlib-metadata==4.2.0
      - importlib-resources==5.4.0
      - iniconfig==1.1.1
      - jeepney==0.7.1
      - jinja2==3.0.3
      - keyring==23.4.1
      - locket==1.0.0
      - markupsafe==2.0.1
      - mccabe==0.7.0
      - msgpack==1.0.5
      - netcdf4==1.6.2
      - numpy==1.19.5
      - packaging==21.3
      - pandas==1.1.5
      - partd==1.2.0
      - pillow==8.4.0
      - pint==0.17
      - pkginfo==1.10.0
      - platformdirs==2.4.0
      - pluggy==1.0.0
      - psutil==7.0.0
      - py==1.11.0
      - pycodestyle==2.9.1
      - pycparser==2.21
      - pyflakes==2.5.0
      - pygments==2.14.0
      - pyparsing==3.1.4
      - pyproj==3.0.1
      - pytest==7.0.1
      - pytest-cov==4.0.0
      - pytest-runner==5.3.2
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - pyyaml==6.0.1
      - readme-renderer==34.0
      - requests==2.27.1
      - requests-toolbelt==1.0.0
      - rfc3986==1.5.0
      - scipy==1.5.4
      - secretstorage==3.3.3
      - six==1.17.0
      - sortedcontainers==2.4.0
      - tblib==1.7.0
      - toml==0.10.2
      - tomli==1.2.3
      - toolz==0.12.0
      - tornado==6.1
      - tox==3.28.0
      - tqdm==4.64.1
      - twine==3.8.0
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - virtualenv==20.16.2
      - watchdog==2.3.1
      - webencodings==0.5.1
      - xarray==0.16.2
      - zict==2.1.0
      - zipp==3.6.0
prefix: /opt/conda/envs/xclim

tests/test_checks.py::TestMissingAnyFills::test_month tests/test_checks.py::TestMissingAnyFills::test_season tests/test_streamflow.py::TestStats::test_missing
tests/test_checks.py::TestDateHandling::test_assert_daily tests/test_checks.py::TestDateHandling::test_bad_frequency tests/test_checks.py::TestDateHandling::test_missing_one_day_between_two_years tests/test_checks.py::TestDateHandling::test_duplicate_dates tests/test_checks.py::TestMissingAnyFills::test_missing_days tests/test_checks.py::TestMissingAnyFills::test_missing_months tests/test_checks.py::TestMissingAnyFills::test_missing_years tests/test_checks.py::TestMissingAnyFills::test_missing_season tests/test_checks.py::TestMissingAnyFills::test_to_period_start tests/test_checks.py::TestMissingAnyFills::test_to_period_end tests/test_streamflow.py::test_base_flow_index tests/test_streamflow.py::Test_FA::test_simple tests/test_streamflow.py::Test_FA::test_no_indexer tests/test_streamflow.py::TestStats::test_simple tests/test_streamflow.py::test_qdoy_max
xclim/checks.py setup.cfg xclim/streamflow.py
xclim/checks.py setup.cfg xclim/streamflow.py