Closed javierxio closed 2 months ago
It would perhaps be easier to use the Intl
builtin object, which is better designed for this operation:
const parts = new Intl.DateTimeFormat('en-US', {
timeZone: "America/Los_Angeles",
hour: "numeric",
hour12: false,
weekday: 'long',
}).formatToParts(new Date())
const day = parts.find(p => p.type === 'weekday')
const hour = parts.find(p => p.type === 'hour')
return hour.value === '14' && day.value !== 'Saturday' && day.value !== 'Sunday'
@JacksonKearl thanks for the code. it seems working on my side. You may want to create a pull request and I can close this one?
I'm not sure exactly how to run this project, does it work with VS Code or do I need a Visual Studio setup?
Okay I've been able to build the basic skeleton of the app, but it's missing a lot of CSS and all the content. Any ideas on how to get this working beyond a basic dotnet watch
?
Ah, on macOS the AudioWebApp.Client.styles.css
is case sensitive.
I will close this PR and can be replaced by https://github.com/jwkent/AudioWebApp/pull/123
Thanks for all the work. Looks good, I will test it on Monday and Tuesday. On Tuesday, April 30, 2024 at 11:32:17 AM PDT, javierxio @.***> wrote:
I will close this PR and can be replaced by #123
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
@benjkent I rewrote this code to account for daylight savings which the time changes twice a year. I have tested this on my local machine. Please also see if you can accept it. Thanks.