Closed jjanusch closed 8 years ago
Good points @jjanusch. The HackMyResume requirement is pretty simple: if the user isn't happy with how HackMyResume handles dates, it's a bug. It should support all of the following:
current: true
YYYY-MM-DD
, 'YYYY-MM,
YYYY`This isn't actually as much work as it seems thanks to the strong library support around dates. For now, one way to dodge nearly all these pesky date display issues is to put date display where it probably needs to be: in the hands of the user. Of which there are two: the theme author and the resume owner.
We can support the first user with better helpers, per your suggestion. +1. Feel free to implement and PR. Only thing I would add is: let's not hard-code it to present
and current
. Those are plausible defaults, but really, any user-defined symbol should work here. I should be able to say:
start: "booyah"
Provided elsewhere I've specified the "currently employed" symbol as booyah
. We just default that symbol to present
or current
if none is specified, and to keep things familiar with our big brother, the JSON Resume schema. But these are arbitrary symbols, especially for non-English/non-Western users.
We can support the second user (the resume owner) with flexible formats, the ability to override the theme- or tool-mandated date format and, beyond that, the ability to specify the display of a particular date. This can be done at the JSON level, via an optional property on the sub-object, or at the options level (and in future versions, HackMyResume will support an .hackmyrc
file for persistent storage of exactly these kinds of options, which would be cumbersome to pass in through the cmd line each time).
As for your specific issue, you'll be able to override the date display, via the nuclear option, in v1.4, probably later today. Thanks!
The specific issue of "current" or "present" not being emitted into themes is fixed in fresh-themes v0.14.0 and HMR 1.6.0 (shortly). Please comment here or post a new issue if you have any problems. Thanks
It appears that a "Present" end date is not supported for any of the current templates. Setting an end date for employment to "present", "current, "", or null results in the current date and so does setting
current: true
, which I had seen in one of the example resumes but does not seem to be valid according to the schema. The issue appears to be that it just automatically formats the safe date rather than logically looking at what that date isI tried adding it myself, but I have no experience with Handlebars and I could not come up with a decent way to do it. There doesn't appear to be ternaries or conditional equals within Handlebars, so doing something to the effect of
{{#if end == "present"}}
or{{end=="present" ? "Present" : formatDate safe.end "MM/DD/YYYY"}}
is out.I thought maybe it could just be done by checking if it's false (ie
{{#if end}}formatDate safe.end "MM/DD/YYYY"{{else}}Present{{/if}}
) would be okay, but it appears that the json-resume project likes using "current" or "present" better. Regardless, these methods would mean a lot of extra conditionals that would need to be added in each individual theme several times, which is messy and not very DRY.I then thought about modifying the
formatDate
helper in HackMyResume directly. This is rough and untested, but I was thinking something along the lines of:Then specific dates within the templates would just need to be modified to have a third property of
true
and it would allow for the user deciding if they prefer "Current" or "Present" from the JSON. This is my preferred method since, ideally, all dates should be pushed through the same formatter and it would just be an extra boolean argument whenever needed. My issue here was that I was unsure how tied together this themes repo is meant to be with HackMyResume/FluentCV. If it's meant to be loose, this would mean the themes are more dependent on HackMyResume/FluentCV than originally intended and using a different engine (like JRS themes being supported with HackMyResume/FluentCV) more difficult.Any thoughts on how best to accomplish this? At the moment, I believe these themes to be unusable because it misrepresents that you have stopped employment this month even though you are still working. Going into an interview without a job would make it seem more desperate and hurt negotiations.