davedelong / time

Robust and type-safe date and time calculations for Swift
MIT License
2.32k stars 77 forks source link

Adds a sample app that displays a calendar #61

Closed TiagoMaiaL closed 2 years ago

TiagoMaiaL commented 2 years ago

Changes

The purpose of this PR is to address issue https://github.com/davedelong/time/issues/24.

It adds a sample iOS application that displays a month calendar and has options to navigate through the months.

Notes:

This sample app uses SwiftUI with the MVVM architecture. The computation of dates and months takes place inside the MonthCalendarViewModel class.

I had to use Foundations' Calendar to get the titles for the week days (Region.current.calendar.shortWeekdaySymbols). I don't know if Time offers a property for it. I would be happy to add this method to this package, if this is something the package would benefit from.

TiagoMaiaL commented 2 years ago

Hello @davedelong.

Is this sample application something the project would want?