class_docstr: A splitter that slices training and test data based on a ``pandas.Period``.
  
  Training entries obtained from this class will be limited to observations
  up to (including) the given ``date``.
  
  Parameters
  ----------
  date
      ``pandas.Period`` determining where the training data ends.
code: def training_entry(self, entry: DataEntry) -> DataEntry:
      length = periods_between(entry["start"], self.date)
      return slice_data_entry(entry, slice(None, length))
  
imports: from abc import ABC, abstractmethod
  from dataclasses import dataclass
  from typing import Generator, Optional, Tuple
  import pandas
  from gluonts.dataset import Dataset, DataEntry
  from gluonts.dataset.field_names import FieldName
label_desc: Use image node_id 1 for calling the DateSplitter obj's underlying member method code with example usage: obj.training_entry(entry) and returns: slice_data_entry