Skip to content

Comments

first_of_month @intCast#57

Open
supxinfy wants to merge 2 commits intorockorager:mainfrom
supxinfy:main
Open

first_of_month @intCast#57
supxinfy wants to merge 2 commits intorockorager:mainfrom
supxinfy:main

Conversation

@supxinfy
Copy link

For some reason an attempt to build this library for Windows ends up with an error related to type mismatch like below. That is not the case for Linux or Mac. This PR adds @intCast to const first_of_month definitions to solve this issue.

C:\Users\runneradmin\AppData\Local\zig\p\zeit-0.6.0-5I6bk36tAgATpSl9wjFmRPMqYN2Mn0JQHgIcRNcqDpJA\src\timezone.zig:864:81: error: expected type 'i32', found 'i64'
        const first_of_month = zeit.weekdayFromDays(days_from_epoch - time.wDay + 1);
                                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
C:\Users\runneradmin\AppData\Local\zig\p\zeit-0.6.0-5I6bk36tAgATpSl9wjFmRPMqYN2Mn0JQHgIcRNcqDpJA\src\timezone.zig:864:81: note: signed 32-bit int cannot represent all possible signed 64-bit values
C:\Users\runneradmin\AppData\Local\zig\p\zeit-0.6.0-5I6bk36tAgATpSl9wjFmRPMqYN2Mn0JQHgIcRNcqDpJA\src\zeit.zig:1783:30: note: parameter type declared here
pub fn weekdayFromDays(days: Days) Weekday {
                             ^~~~

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

Successfully merging this pull request may close these issues.

1 participant