Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'dateComponents' is inaccessible due to 'internal' protection level #295

Open
LilMoke opened this issue Sep 19, 2020 · 2 comments
Open

'dateComponents' is inaccessible due to 'internal' protection level #295

LilMoke opened this issue Sep 19, 2020 · 2 comments

Comments

@LilMoke
Copy link

LilMoke commented Sep 19, 2020

Hello,

I am receiving the message: 'dateComponents' is inaccessible due to 'internal' protection level

on the following line:

let datePeriod = TimePeriod(beginning: startDate!, chunk: TimeChunk.dateComponents(minutes: duration))

I understand why, but how can I accomplish creating a TimeChunk from the minutes?

@maniramezan
Copy link

    • You do:
duration.minutes

And that returns TimeChunk. No need to initialize it like that.

@LilMoke
Copy link
Author

LilMoke commented Sep 20, 2020

Ahhhh yes!! I see, thnank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants