One Logo Pool Ball
CreateMLComponents · IOS API REFERENCE

DateFeatures

struct · iOS 18.0+ · SDK 27.1

struct DateFeatures

A set of date and time features. The choice of features for a particular task depends on the relevance of different date and time components. For example a dataset of weather data may require hour and day-of-year features, while a dataset of workout metrics may require second, hour, and weekday features.

Members (12)

get · iOS 18.0+

weekOfYear

TypeScript
get weekOfYear(): DateFeatures
Swift declaration
static let weekOfYear: DateFeatures

A feature representing the week within the year.

get · iOS 18.0+

weekOfMonth

TypeScript
get weekOfMonth(): DateFeatures
Swift declaration
static let weekOfMonth: DateFeatures

A feature representing the week within the month.

get · iOS 18.0+

day

TypeScript
get day(): DateFeatures
Swift declaration
static let day: DateFeatures

A feature representing the day within the month.

get · iOS 18.0+

hour

TypeScript
get hour(): DateFeatures
Swift declaration
static let hour: DateFeatures

A feature representing the hour within the day.

get · iOS 18.0+

month

TypeScript
get month(): DateFeatures
Swift declaration
static let month: DateFeatures

A feature representing the month within the year.

get · iOS 18.0+

minute

TypeScript
get minute(): DateFeatures
Swift declaration
static let minute: DateFeatures

A feature representing the minute within the hour.

get · iOS 18.0+

second

TypeScript
get second(): DateFeatures
Swift declaration
static let second: DateFeatures

A feature representing the second within the minute.

get · iOS 18.0+

weekday

TypeScript
get weekday(): DateFeatures
Swift declaration
static let weekday: DateFeatures

A feature representing the weekday.

init · iOS 18.0+

init

TypeScript
init(rawValue: number): DateFeatures
Swift declaration
init(rawValue: Int)

Creates a feature from a raw value.

get · iOS 18.0+

rawValue

TypeScript
getRawValue($self: DateFeatures): number
Swift declaration
var rawValue: Int

The corresponding value of the raw type. A new instance initialized with `rawValue` will be equivalent to this instance. For example: enum PaperSize: String { case A4, A5, Letter, Legal } let selectedSize = PaperSize.Letter print(selectedSize.rawValue) // Prints "Letter" print(selectedSize == PaperSize(rawValue: selectedSize.rawValue)!) // Prints "true"

set · iOS 18.0+

rawValue

TypeScript
setRawValue($self: DateFeatures, value: number): void
Swift declaration
var rawValue: Int

The corresponding value of the raw type. A new instance initialized with `rawValue` will be equivalent to this instance. For example: enum PaperSize: String { case A4, A5, Letter, Legal } let selectedSize = PaperSize.Letter print(selectedSize.rawValue) // Prints "Letter" print(selectedSize == PaperSize(rawValue: selectedSize.rawValue)!) // Prints "true"

get · iOS 18.0+

dayOfYear

TypeScript
get dayOfYear(): DateFeatures
Swift declaration
static let dayOfYear: DateFeatures

A feature representing the day within the year.

Skipped declarations

No declarations were skipped in this snapshot.

All CreateMLComponents types →