dev
textPage 10 of 208
50 messages on this page
Sunday, April 3, 2022
User bddf69
Honestly, anything you run across where you think "this would be better suited as a helper" is game
User 882420
I'll look into adding the import/export feature to hooks next. Just gotta finish coding a system for a server I play on.
User 882420
Most of my experience is in C#, but I'm able to learn new languages really quickly.
User 882420
Never touched Javascript before and I made that command in like 20 mins lol.
User 882420
List any helpers you want and I'll add them.
User 882420
Ok all good.
User bddf69
whatever data I copied, I likely did it at that time :)
User bddf69
Playground uses static data
User 882420
When I use
date in the playground it says it's 2019-03-16.User 882420
Yeah, completely forgot about that, literally looked at that page for working out the command lol.
User bddf69
It supports a few different ways of passing the date
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse#date_time_string_format
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse#date_time_string_format
User bddf69
Javascripts
Date encompasses date and time at once :)User 882420
Doesn't include the time.
User 882420
It only uses the date.
User bddf69
Doesn't your datePassed helper already do that?
User 882420
Time string being
YYYY-MM-DDTHH:MM:SS.User 882420
What should I call a helper for checking a time string to see if it is in the past?
User 882420
All good man.
User 882420
Will work on some more helpers and tests.
User bddf69
Thanks ^^
User bddf69
So I'll be merging once the CI passes again
User bddf69
Other than that, looks all good
User bddf69
Added another commit which adds some automated tests :)
User 882420
Ok all good.
User bddf69
You can't, it's an error because Docker credentials don't get passed to your branch
User bddf69
Thanks, I'll take a look in a bit ๐
User 882420
Nice just made my first pull request lol.
User bddf69
but the branch where you make the changes doesnt matter I think
User bddf69
Your PR should target the develop branch
User 882420
Aight, what branch should I make the changes on?
User bddf69
Aimed at the docs, but the principle is the same :p
User bddf69
This is some info on making PRs
https://docs.csmm.app/en/contributing.html
https://docs.csmm.app/en/contributing.html
User 882420
Just created the fork.
User bddf69
Then, make your changes on a branch there and then make a PR to the main repo
User bddf69
You can do that top right of the repo
User bddf69
In order to do that, first make a fork of the main repo
User bddf69
So to submit your changes, you'll have to make a PR since you don't have rights to push to the main repo
User bddf69
Awesome!
User 882420
Getting github setup now.
User 882420
Just made a helper for seeing if a date has passed:
Handlebars.registerHelper('datePassed', function (date) { return ((Date.now() - Date.parse(date)) >= 0); });
Usage:
code to execute {{/if}}``` Examples: ```{{#if (datePassed date)}} say "This date has passed!" {{/if}}```
Friday, February 25, 2022
User 6ceaf4
Even better
User bddf69
Haven't tested that :P But I imagine it works the same as other nested helpers, you'd use
../index to access the outer scopeUser 6ceaf4
Just making sure nothing gets broken. Other than that, many thanks
User 6ceaf4
{{times}} inside a {{each}} using {{index}} and the other way around won't make any conflict with the internal index since this last one uses a @, right?
User bddf69
Going live in a few minutes ๐
User a506fe



