<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateMLComponents",
  "identifier" : "/documentation/CreateMLComponents/DateFeatureExtractor/init(features:calendar:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Create ML Components"
    ],
    "preciseIdentifier" : "s:18CreateMLComponents20DateFeatureExtractorV8features8calendarACyxGAA0C8FeaturesV_10Foundation8CalendarVtcfc"
  },
  "title" : "init(features:calendar:)"
}
-->

# init(features:calendar:)

Creates a date feature extractor.

```
init(features: DateFeatures, calendar: Calendar = Calendar.current)
```

## Parameters

`features`

The date and time features.

`calendar`

The calendar to use, defaults to `Calendar.current`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)