date formatter

Generated on 10/26/2024

1 search

To format dates in your app, you can use the new reference date format style introduced in SwiftUI. This allows you to display live times and dates, which are customizable and can adapt to the size of their container. This feature is particularly useful for widgets and live activities, as it includes date references, date offsets, and timers. You can find more details in the session What’s new in SwiftUI (10:57).

Additionally, if you are working on multilingual apps, you can use the formatted API to ensure that names and numbers are displayed correctly according to the user's locale. This is discussed in the session Build multilingual-ready apps (10:33).

For more advanced date handling, such as extracting date components for machine learning models, you can refer to the session What’s new in Create ML (08:38), which introduces a date feature extractor component.

Explore wellbeing APIs in HealthKit

Explore wellbeing APIs in HealthKit

Learn how to incorporate mental health and wellbeing into your app using HealthKit. There are new APIs for State of Mind, as well as for Depression Risk and Anxiety Risk. We’ll dive into principles of emotion science to cover how reflecting on feelings can be beneficial, and how State of Mind can be used to represent different types of mood and emotion.

Bring context to today’s weather

Bring context to today’s weather

Harness the power of WeatherKit to get detailed weather forecast data such as precipitation amounts by type, cloud cover by altitude, or maximum wind speed. Find out how you can summarize weather by different parts of the day and highlight significant upcoming changes to temperature or precipitation. Understand how you can compare current weather to the past through our Historical Comparisons dataset and dive into historical weather statistics for any location in the world. We’ll also explore how you can do all of this faster with our Swift and REST APIs.

What’s new in SwiftUI

What’s new in SwiftUI

Learn how you can use SwiftUI to build great apps for any Apple platform. Explore a fresh new look and feel for tabs and documents on iPadOS. Improve your window management with new windowing APIs, and gain more control over immersive spaces and volumes in your visionOS apps. We’ll also take you through other exciting refinements that help you make expressive charts, customize and layout text, and so much more.

Build multilingual-ready apps

Build multilingual-ready apps

Ensure your app works properly and effectively for multilingual users. Learn best practices for text input, display, search, and formatting. Get details on typing in multiple languages without switching between keyboards. And find out how the latest advances in the String Catalog can make localization even easier.

What’s new in Create ML

What’s new in Create ML

Explore updates to Create ML, including interactive data source previews and a new template for building object tracking models for visionOS apps. We’ll also cover important framework improvements, including new time-series forecasting and classification APIs.