Show HN: Stretch My Time Off – An Algorithm to Optimize Your Vacation Days

1 year ago (stretchmytimeoff.com)

Hey HN! I built StretchMyTimeOff as a quick experiment using Cursor (Anysphere's AI code editor) and GPT-4o to see how far AI could go in building a simple, functional site.

What it does: The site helps you get the most out of your vacation by suggesting optimal days to take off around national holidays, maximizing long breaks with minimal vacation days, anywhere in the world and for any calendar year.

It's an idea I've had for a while, and building the algorithm with GPT was a fun challenge. Any feedback or ideas I'm all ears :)

Ha, this reminds me of a very similar practice I used to engage in with a few buddies when we started work. It was always fun to try to figure out how to optimize the PTO to get the “most days per day”.

Nowadays, I find that the best time to take PTO is when I feel like taking PTO. Taking a long weekend when I’m feeling burnt out or disengaged goes much further for me than grinding for the entire first half of th year to get a week off for 4th of July. YMMV.

  • Depending on your role and environment, certain days are also have more value in my eyes than others. For example, people tend not to push heavy stressful and potentially disaster risk processes on Fridays. They either do these on weird off hours for their target user base at large scales or Mondays in general. Fridays where I’m at tend to be “easier” days people intentionally try to make so for a gentle transition into the weekend.

    As such, taking off Fridays tends to get me less ROI while Mondays tends to be nice because while everyone deals with problems from the last week head on, I can roll in on a Tuesday with the benefit of their insights and progress. Then there’s the fact even if I’m off on Friday people I socialize with are likely still working anyways so… it could be any day for myself.

    • This is key - taking the week between Christmas and New Year's often maximizes PTO days, but everyone does that so that week is quiet, simple, and you can put your head down and get some real work done.

      1 reply →

  • Most days per day also probably means that you're maximizing the amount you spend on travel and the pain you experience. It's not cheap or pleasant traveling around July 4th.

  • Exactly! I will throw a day off a few weeks away so that I have something to look forward to. When it actually arrives sometimes I don't even care anymore, but it is a great morale booster in the moment. A few three day weekend can be so much more impactful than having 9 days off instead of 5ish.

    Looking at the calendar and seeing the next holiday is 6+ weeks away can really drag you down.

  • It's important to take off a day when you're feeling burnt out, but for some, I think it's also important to plan ahead a little bit to see the "most days per day" where you, your kids, your partner, etc. will all have off together.

  • Agreed, in Switzerland this idea of "stretching" is common but I find it stupid. Weather going to be bad? Doesnt matter, I can stretch my total time off 3 days more!!! Total off season to where I am traveling to? Doesnt matter, I get that single extra "bridge" day! Man so cringe.

    I don't know, seems much easier that if you dont want to work then don't!

    I mean the tool OP posted recommended 2 weeks off at the end of March into April on the easter holiday (because of the friday and monday holiday)... who is honestly doing that?

    This topic has always rubbed me the wrong way I think because its way too closely tied to the whole workaday / "work sucks" / ratrace / 9-5 mentality.

    One other thing as I continue my rant, related, the whole "plan your holidays for the next year so we can figure out the resource planning, even if you move your holiday!" Ugh so depressing, I always am like "welp next year is planned already and its only November". Nothing spontaneous, nothing interesting.

    Anyway, I realize also I am likely in the minority here, HN folks will do anything for a "hack".

    • >>I mean the tool OP posted recommended 2 weeks off at the end of March into April on the easter holiday (because of the friday and monday holiday)... who is honestly doing that?

      sad parents tied to school holidays noises.

      17 replies →

    • When I was in my early 20s I had a few friends who were obsessed with traveling and would do stuff like this to maximize long blocks of time off, then they'd pick where to go because now they have 9 days instead of 4, and decide where to go backed on what time of year they had that longer block.

      If your trying to maximize "contiguous days off" and you truly don't care when it is, a tool like this is super helpful.

      1 reply →

    • > 2 weeks off at the end of March into April on the easter holiday (because of the friday and monday holiday)... who is honestly doing that?

      It's like peak cross country season?! Still loads of snow, but nice weather. I skied in shorts and a tshirt for days this easter!

      You know you don't have to do as the tool says? It just highlights one of many variables you can use when deciding when to take your time off. If you have other needs (as your weather thingy, or spontaneity, or when kids are off school), you are of course free to take that into account.

    • > plan your holidays for the next year

      i am absolutely lost in why anyone would do that. And on other side, resource planning is only lame excuse.

      But AFAIK most of western europe goes that way.. which is a preliminary planned existance. Boring like hell. Where is Life?

      3 replies →

I typically try to take annual leave and to travel exactly on the opposite dates to what this tool recommends. That's because I care more about avoiding the significant extra expense, traffic, and crowds of travel over public holiday periods, than I do about getting a few extra "free days" of leave. No free lunch!

  • I take time off in the winter because it’s a dreadful time to be in Berlin, while the summers are sacred and shouldn’t be spent anywhere else.

  • Good luck traveling on work days!

    • I love doing vacations that start/end midweek. It’s nice to buffer either end of the trip with short work weeks, midweek travel can be less frantic, and being able to spend weekend days at your vacation destination often lets you do more fun things rather than being there on weekdays

    • Strange comment. Isn't travel on work days better? People are at work, so plane and train tickets seem to be cheaper on those days because there's less demand.

      1 reply →

    • This is a real worry? Don't you just not go to meetings but otherwise solemnly swear that you're working on the plane?

    • Works great with an evening flight, you can work all day and leave for the airport after work.

    • Surprised this passive agressive comment is not further downvoted. Doesn't add to the conversation.

      Anyway, OP has a point. I hate traveling on the same day everyone else plans to due to some holiday gap / bridge / whatever.

      1 reply →

    • It's fine as long as you avoid the very specific times people commute at, and/or are heading to a place where there aren't so many 9-5 jobs, like a beach town.

    • Depending on the city it can be just fine, if not quieter to travel on a weekday.

    • Ummm... driving out of my metro area, in any direction, on a work day: zero traffic! Doing so at the start of a long weekend / during Xmas - New Year: horrendous traffic! Is that not the case for you?

Congrats ! However I feel the claim is lying to me and inconsistant:

« In […], there are 11 public holidays in 2024.

Let's stretch your time off from 25 days to 61 days »

61 actually adds up my time off (25) with adjacent week ends and public holidays (27). The 9 missing are week ends already next to public holliday but without any proposed time off extension. If you’re gonna count the WE next to PU it would be fair to include them in the initial count.

The inconsistency is that I didn’t count one Saturday next to a public Holliday in Sunday, while the +9 I’m referring above are Friday/Monday next to week ends.

I know this does not make your product less useful, but in a psychological perspective it toggle my defence mode instantly [0] in the same way an over promising advertisement as the opposite effect than expected.

0: discussion ongoing here https://news.ycombinator.com/item?id=42113449

  • This reminds how my dad explained me when I was a kid that I actually never go to school (despite evidence for the opposite :))

    He would count the days of, than all the weekend, then all the hours I am an home across the year (so double counting what he subtracted before) etc, ending with zero days left for school.

    This was driving me mad when I was walking to school :)

This seems like the start of something handy, but isn't yet useful. As others have mentioned, which holidays a company offers will vary. But more than that, given a number of days off and a calendar year, this currently seems to output only 1 result, though of course there are a large number of ties (in terms of consecutive days not worked). The current tool doesn't allow the user to 'edit' or swap between 'equally good' allocations. In my attempt, it produced a very skewed result, using the vast majority of days between November and February, and using zero days in July through October. If it suggests using 4 days to extend a holiday into 9 consecutive days, there's no way to express that you'd rather do that for Labor Day than for Veterans day. If it's extending a 3-day weekend into a 4-day one, you can't indicate that you'd rather do that with Columbus Day than with Presidents Day.

  • Thanks for your feedback! Indeed the algorithm only gives one result, as it tries to fill all gaps from smallest to biggest in the best way possible to create clusters.

    Making it super customisable would be tough, as then it becomes just a personal calendar. Maybe showing the rankings transparently (3 options tied, choose which one wins) could be nice.

    • Hi Zachd, I like this, but I'd like to be able to do it for custom date ranges, and add custom constraints.

      for example, my company has mandatory shutdown days, I have x additional days leave, and z study days leave that I expected to not use more than 1 study day in the same week and I need to use some of my leave by 30 jun as australia businesses manage the financial year as july to june, not jan to december.

    • Even a simple weighting might work… “do you prefer your time off to be near major public holidays?” Or “which season do you prefer to travel?” Then with the 4 day weeks accordingly. The results it gave me skipped over a lot of other federal holidays and seemed to focus all time off at years end, when I definitely do not want to travel. Which really it just needs to look for weeks with a single day off to buddy up with.

    • I think a simple feature that would actually effectively enable what they wanted would be to let the user manually add days which should be included in the PTO

      Like maybe make the days clickable and give us a popover button for : it'd like this day to be free - and just tread this day as a holiday from there (while deducting the day from the quota)

Awesome site! One nitpick: Could you please just use `Taiwan` instead of `Taiwan, Province of China`. Thanks!

Hey, that's an impressive site for being built using a code assistant.

I was wondering where you got the list of countries from or whether you're using a library for the dropdown?

(Curious because visiting the site from Taiwan it lists it as "Taiwan, Province of China")

Nice tool! Some feedback:

- The subtitle telling me I can "stretch [my] time off from 20 days to 42 days" is quite misleading. This tool doesn't magically give me more vacation days.

- Much of the page isn't helpful (in NL there are 6 consecutive months without holidays), would suggest only showing months where "stretching" is possible.

  • Also, it doesn't "stretch" my time off from 25 to 49 days: 6 are national holidays that fall on a weekday, so I would be off on those anyway. So the calculation is wrong.

I love this! Every year in Sweden around christmas, almost all popular magazines publish articles for how to optimally book your vacation days. We have quite a few bank days between christmas and new years, so certain years you can get like 3 weeks off by booking 6 days or so.

This year it looks like you can achieve the following: In december, take 23rd and 27th off and you get 9 days consecutive time off between 21st and 29th. Add 30th and 31st, and you'll get 12 days consecutive. Add 2nd and 3rd of January and tada, you have 17 days vacation for the price off 6 PTO days! The website linked in this post doesn't get this quite right, as 24th is technically not a public holiday but the vast portion of companies regard it as such.

  • The 24th of December is a weekend by law in Sweden (Semesterlag 3 a §)

    "Lördag och söndag räknas inte som semesterdagar annat än i fall som avses i 9 § tredje stycket. Med söndag jämställs allmän helgdag samt midsommarafton, julafton och nyårsafton."

Most companies don't take all public holidays; this ends up being primarily for Federal workers who do get each of those holidays.

If you make a table of holidays and then check on/off those applicable, then have the algorithm fill back in as needed, that would be helpful.

  • Thanks for the feedback! ChatGPT and I made the change to hide individual holidays for a country per year, click "edit list" :)

This is a great idea for something I typically do manually to plan around maximizing vacation time around when my kids have off.

Would recommend being able to adjust the public holidays - for example: Juneteenth and Veterans day off were not days off of school+work.

Other future improvements would be some kind of tie in for airfare - these are typically some of the most expensive times to fly.

Love the idea

Well done! Though it oversells it a bit. Check japan for instance you get 10 holidays a year, and it says you'll be able to stretch it to 51 days. Which is true to some extent. But the actual extra days off due to placing your holidays in the right spots is more like 13 days extra days.

So would be better to calculate it like that.

It's interesting all the comments are focused on the functionality and not on how it was built. Can you write some more on the experience? You say it was "a fun challenge." Would you consider using Cursor again? What parts of the site (e.g. UI, backend) did you use Cursor heavily and what parts do you use it minimally?

In the state selector, I typed "N" (for New York) and was surprised to see Arizona. After playing around with it, I realize that typeahead isn't working as usual: it's matching any state that has the letter "n" in it.

  • This is really more interesting? Don't you have the strong feeling that using the AI "really boosted their workflow"?

    When can we start talking about things in themselves again? I know its gotta happen eventually, but its been so long, its getting all so boring these days. Like I woke up one day and half the hackers in the world turned into guys talking about different TV manufacturers at Best Buy.

Really neat idea! However, half of the world has Monday as the first day of the week. A setting to change that would be nice :)

Also there are some holidays missing for Sweden. This is stated in the Swedish Annual Leave Act, which establishes that Midsummer's Eve as well as Christmas Eve and New Year's Eve is to be considered equivalent to a Sunday.

https://www.government.se/contentassets/eaf3467d4f484c9fb727...

  • Doesn't work for Sweden anyway, because people will think you're mad if you don't take at least three weeks in July/August, where there are no other public holidays.

    Maybe a feature where I'm manually picking some days and it tries to figure out the best way to stretch the remaining nice would be useful.

    • You can reduce the number of days it places already, though. So if you assume you take 15 days in july just reduce the amount of days by 15. Don't get to visualize them, however, and its choices might overlap with yours, so not a perfect workaround.

      I also would like the week to start on a monday, btw. Perhaps it could be tied to the country? When choosing norway, calender could shift to how it's displayed here.

  • Hi, thanks for your feedback. GPT was able to make your change for Monday vs Sunday week starting :)

I like to use my vacation days to change my workweek from five days per week to four days a week by using one vacation day every Friday (could also do Monday or Wednesday, each has advantages and disadvantages). This year using this method, I managed to make it so that starting with October I'm only working four days a week.

It could be longer, but my superiors told me that according to law, I have to take one break that's at least 10 vacation days long and after that I can use the days as I wish.

I'd like to add some more constraints, like "I'd like to maximize my time off around christmas", where you can see different alternatives e.g.

using 3 days off, you get 7 consecutive days using 4 days off, you get 9 consecutive days

Because sprinkling them to maximize the total number of days isn't really interesting in reality, even though it's an interesting programming challenge. The reason is that I want to have at least maybe 4 out of 6 weeks off consecutively in the summer months, even if that's not maximizing the total number of consecutive days off. It's those remaining 5-10 days I'd like to optimize for particular holidays and so on.

You could also imagine assigning weights to the months. E.g. 1 day off in July is the same value as 10 days off in January (Say you live where the sun doesn't rise without saying you live where the sun doesn't rise)

Interesting idea but I do not see the point: people are able to compute the same results mentally very easily.

By the way, I would suggest adding an option: how many consecutive days off does the company allow. And which days are absolutely not allowed to be taken.

10 years ago, in my company (based in Japan), taking a day off on the first day of the week (generally Monday unless there's an holiday) was not allowed due to the general meeting kicking off the week. This changed recently in my company but as this meeting is common in many Japanese companies, some companies might still apply this restriction.

Likewise, taking a day off before or after a holiday was not allowed except for some specific days (typically Golden Week end of April/beginning of May, Obon in August, and the end of year/New Year). This changed a few years ago.

This is really cool! I might use this to help plan some of my 2025 vacations

Some suggestions for useful features:

- Ability to customize the work week. I only work Mon-Thurs, which will greatly affect the optimal solution

- Add arbitrary holidays in case the company gives an extra day off, this would nicely complement the existing feature to turn off some holidays

- Select an arbitrary time frame less than a year long. This would be helpful especially to plan end-of-year vacations

- In addition to or instead of the previous point: input what vacations you already have planned. Obviously I can't always take only the most optimal vacations, but I could potentially make my existing ones more optimal by extending them in some cases

Thanks for sharing it! Really cool idea, I've only done this kind of planning ad-hoc in my head, it never occurred to me to solve it exactly

Fun experiment but in reality people take vacation in the summer due to the season and schools, not because there are more public holidays then.

This tool just told me to take all of December off, great time to sit somewhere in the cold.

  • December is a great time to take a vacation to somewhere warm if you don't like the winter. I like to travel to the Canary Islands from end of December to January. Last time we had 20-25 degrees. Definitely warm enough for the beach.

    • Even if it was cooler, say 15 degrees, going somewhere with more daylight hours is really great at that time of year.

      On 1st January, London gets 8 hours of daylight, Edinburgh 7 hours, Stockholm 6 hours. Tenerife has nearly 11!

    • Winter doesn't even start until late December, seems like February would be a better time to nope out of the cold weather, after you've gotten tired of the novelty.

      1 reply →

  • Same here. While it's great to have long holidays, it doesn't sound fun at all to have no days off between June and November.

  • See, for me it prefers I take nearly the whole month of May off once I go over 15 days of vacation. I think it's very much going for local maxima.

Would love to see a "use X days off between now and the end of the year" feature. Putting in the amount of PTO I've currently got gets shown for the whole year instead of just through EOY

IMO taking off Thanksgiving Friday is a red herring. Everyone takes that day off, so anyone still in isn't expected to do much. I'll be "working" from home that day.

Awesome! That reminds me of my paternity leave which I turned into basically working 3 days per week for a long time with some special considerations around holidays.

There is another layer to holidays optimisation based on stressful days though: eg. I'd rather work on a friday (when tons of people are off anyway, little chance of anyone bothering me with some meetings) than a monday; similarly I'd rather work around Christmas time than any other.

With Agile, I have found that I'm never able to just take a day off here and there. I need to take enough time off that I can meaningfully commit to taking less work in the sprint, otherwise my day off just leads to working nights and weekends to catch up. So it's either take the entire 2-week sprint off, or an entire week and hope I can correctly estimate what half a workload looks like.

Yes, yes, doing Agile wrong etc

  • Or you can just catch up when you're working? I don't understand what this has to do with agile. Are they going to fire you if you don't finish the sprint's tasks?

    • Eventually, yes?

      Everywhere I’ve ever worked has treated sprints as an endless series of 2 week deadlines.

      (Yes, I understand this is not “real” agile. I’ve never seen “real” agile and don’t personally know anyone who has.)

      1 reply →

  • I think it’d be really hard not to psychologically anchor.

    My experience with agile is either: * you get stressed out being measured at such a low resolution and sandbag or * you wind up in a low accountability context because even management knows how messed up scrum is for their use case.

    I wish we had something better.

Found you a fun edge case in France: your tool doesn’t know how to faire le pont.

Holidays here often land on a Thursday. It’s generally agreed to not be worth the effort to get back into work mode for just one day, so everybody takes Friday off too. (Thus, “making the bridge)

This doesn’t count against your vacation time. Even schools take the days off. Holidays seem to be scheduled this way intentionally, and sometimes they’ll even have one on a Wednesday.

  • That's wrong, the pont isn't free. Your employer uses one of your RTTs.

Fun tool! I'd love for the "Edit List" menu to allow me to add company holidays to factor those into the maximization

This is pretty cool. I've organically done something similar for many years (i.e. tried to optimize leave to coincide with public holidays to get those extra long weekends.)

If you think it would be fun, maybe you could expose different algorithm choices for how to allocate the blocks?

Eg, I don't necessarily need to maximize the block lengths, but would like the holidays to be more evenly spread through the year. At the moment, it gives me a huge block around the easter period and another one week block later in the same month. And then, there are no holidays for an entire six months from the end of May to the start of November, despite several public holidays in between! I suggest an alternative algorithm would seek fewer one-week blocks and more long-weekend blocks, with some sort of pressure which penalizes blocks for being too close together?

Like others have mentioned, being able to toggle which days are holidays would make this useful.

I get (8) holidays each year: New Year’s Day, Memorial Day, July 4th, Labor Day, Thanksgiving, Black Friday, Christmas Eve, and Christmas Day.

Two of my company holidays aren’t federal holidays, so being able to toggle arbitrary weekdays as holidays would also be useful.

Also, sometimes holidays fall on the weekend and the observed holiday date is arbitrarily chosen.

Your algorithm did pick the same vacation days as I did this year for December, so it does seem to be working properly in that sense :)

  • Thanks for sharing! The option to toggle holidays on/off should be working. Being able to arbitrarily add a chosen day isn't there, you just need to +1 to your days off count and let the algorithm choose for you.

Very useful app, especially for kids holidays. I live in Bavaria, Germany and the holidays are different from other regions. I really like the app and hope you will continue to update it.

Something is strange in the math for "Let's stretch your time off from X days to Y days"

I am in the US, and it says I have 11 days off. If I say I get 0 days off, it says: "Let's stretch your time off from 0 days to 18 days". It looks like it's counting the weekends prior to a holiday no matter what as a "bonus" day, which is a strange methodology to me. (I would expect that it would only count days that it performed some action to optimize, otherwise it's just table stakes)

  • The tool is great, I would definitely use it couple of times a year to see the "pattern" :) The design is great!

    Adding to the comment on "calculations". Perhaps the wording could be improved, now it feels a bit like a dark pattern in sales.

    This is not the best version, but explains what I mean:

    "Let's turn your X days of time off into Y days of holidays."

  • Thanks, the count could indeed be improved. I left it as counting all clusters > 2 days as valid extra time off, so all 3 day weekends made from national holidays would be included. But of course it's over optimistic :)

    • I would almost rather know how many 'blocks'I got off. Like, tell me how many 1 week chunks I get, how many 2 week chunks I get, etc.

Nice idea, but I was a little surprised that now, in November, it would give me a default of 20 days for this year. Maybe a checkbox "starting today/tomorrow" would make it a lot more useful. Additional constraints, as I am a spoiled German. Some days are often half off for the whole company, typically December 24 and 31.

And then obviously it might make sense to "lock in" certain clusters, or ignore them, but in contrast what I wrote above, this would be eye candy.

A much simpler way to do this is to move to a country or join a company where you get a lot of vacation days, and then you don't need to worry about it.

A guy I used to work with had a spreadsheet that accounted for how quickly he accumulated PTO (something like ~7.5 hours per 2 week pay period) and would not only forcast when to take vacations but how much PTO he could use and still earn enough before the next one.

I could see you incorporating something like that in your site.

Another idea, would be to consider the protected 'wellbeing or sick' days that some states like Illinois have.

My employer sets aside a few extra holidays to bridge holidays to the weekend. For example this year July 4th was on Thursday so they gave the Friday off too. They also give Winter holidays from 24th to the 1st so its aligned right, a few more vacation days and it adds up to two weeks. And usually the day before long holidays teams tend to work half day so sometimes you don't even need to take a day off.

Would be interesting if you can also factor in a school schedule or Jewish holidays as well. There are probably other layers you could add because school schedules in the US and England are very different. After having kids and observing the challenges with another family through a nanny share in the pandemic, I need to apply these constraints, and it takes a few go arounds to get right.

It's very nice. I'd like the feature to set some "fixed time off" (e.g. school is closed) and substract them from my days of.

It should span over the New Year:

Dec 21 to Dec 31: 11 days is actually Dec 21 to Jan 1: 12 days and still only 5 vacation days.

Very nice. All the holidays look correct.

Covers most of the tricks people here (New Zealand) use to stretch out their Holiday lengths.

Nice idea, but it seems that for some countries the longest possible time off has a big overlap with school holidays, which makes sense. However travelling during school breaks is more expensive, it would be nice to find a way to optimize time off while trying to avoid school holidays.

Folks under brazilian law , employed as "CLT", have 30 days PTO, but it must be divided into up to three periods, one of them has to be at least 14 consecutive days, and the other two at least 5 days each.

Sure would be nice to stretch 30 days to 61 as the app suggests...

It would be great to set limits on how much leave is scheduled at once or per quarter. My company says you should ask a manager if you book more than 25% of leave per quarter, so it would be good to know the max I can book without having to ask for permission.

If you add the ability to toggle days in various states this could be a really useful tool for me. Unfortunately I have family obligations that occur at various times in the year. Clickable cells that would change them from day/off or not could really help here.

  • Thanks! ChatGPT and I made the change for per-state support and to hide individual holidays each year :)

It looks like the day of the week is off by one. Jan 1 2025 is a Wednesday, labeled Tuesday. Fridays is labeled as the weekend, for all weeks.

Other than that, this looks cool. Wish you could turn off public holidays though, some of us don't get those.

  • The ability to exclude or include public holidays where as a federal employee or not (self employed) would be useful too

Awesome idea, some suggestions (to fit my use case)

My annual leave resets on April 1st, so being able to change the year would be handy.

I worked compressed hours (I have every Friday off)

I can carry over 5 unused days to the next year, and buy 5 more days. This might impact what days I take off.

  • Thanks! I made options to change the year and leave balance, but not to change the first day of the year. Let me know if it still works if you enter the right number of days

Looks like it doesn't handle year transitions nicely?

In NSW Australia, it shows 11 days between Dec 21 and Dec 31, but Jan 1 is a public holiday here and you capsule add Jan2&3 plus the following weekend to get 16 days 21 Dec 2024 through 5 Jan 2025.

LOL, this works well. I used to do exactly this manually every year to maximize free time blocks for pursuing pet projects. Bravo. Great use of GPT. Could you also add factoring in sick days per year (mon/fri)?

Cool project!

Some regional feedback coming from Sweden - your source data set is not 100% in line with what most workers in Sweden will get. For example, 24 December, 31 December and Midsummer's Eve are not reflected as days off in this calendar.

Very cool site! I think it could be a nice idea to add a 'shuffle' option, if the suggested days don't suit you. Also to be able to select what days you work, as not everyone works mon - fri (;

As others have said, I would love to see more variations to show “options” on ties, and also have more customization around holidays. Not just show/hide but adding and removing custom dates would be great!

This is a cool idea. A couple suggestions:

- A lot of companies shut down for the period between Christmas and New Years. That should be a check box.

- There should be user preference for vacation during warm or cold weather seasons.

In Tokyo, Japan where I work, I get a generous number of days off. I was surprised just how long this could be stretched.

- Tokyo 30 days to 83 days.

- Hong Kong 30 days to 77 days.

- California 30 days to 76 days.

- France 30 days to 70 days.

:-) thanks for sharing.

It would be lovely to have key ChatGPT prompts available, e.g. in the git history, i.e. how did you get from here to there? and in contrast, what did you do manually?

This is awesome. For the next iteration, can you make a new list for extra days that need to be off for things like, oh, kids are out of school for teacher planning day?

I think it could be useful to show and take into account January 2025 as well. I'm planning my Christmas holidays including several days off in the beginning of Jan.

I have a planned trip to work around. I want to make sure those are booked, and allocate the rest optimally. I suppose this is the same problem as having extra days to allocate.

This is a clever project; thanks for sharing.

It demonstrates nicely why I strongly prefer an "unlimited PTO" policy: I never want to have to think about any of this.

  • Out of interest, how many days leave do you actually take in an average year?

    • I don't precisely know - that's the beauty of it! More than I used to take when I had to cautiously ration each precious day out from a limited supply, each time asking "is this really important enough to spend a PTO day on, and will I be leaving enough days in reserve in case something more important comes up later?" Now I just go when I feel like going, and there's no stress about it.

That's pretty cool. Unfortunately school holidays mean I can't take time off whenever, but I can definitely use the idea to plan time off around those.

Cool tool! I was always doing this manually... :-D

Only complain I have is that there is no setting to display Monday as the first day on the calendar display, not Sunday.

I don't get it. This doesn't net you additional days of vacation. A day off in the middle of the week is still a day off, and rejuvenating.

Love the idea

UK is missing the August bank holiday btw. And for bank holidays the UK is split in two 3 lists: England & Wales, Scotland and Northern Ireland

Neat idea. I actually optimize the opposite. I want the most 3-day weekends I can have per year, as evenly spaced across the year as possible.

  • The line that says "let's stretch your time off from X days to Y days" is actually misleading, because algorithm optimises for longer consecutive vacations, not for larger amount of vacation days.

    Following your strategy the Y will be 3 for any PTO day taken, with public holidays total would easily hit 60+ days.

Nice site, but my time off planning start in October to September of the next year. I wish I could specify that. Keep up with the nice work!

FYI your site is blocked by corporate firewall, guessing SSL cert issue. Seems to happen with a lot of hobby project sites.

This tool confirms it visually: May is mostly a "month off" in France, with three bank holidays in three weeks.

Great work. Coincidentally, I am working on similar tool built using Sveltekit and posted about it on HN today as well :-)

I knew a guy that just took Friday off every day.

Three day weekends for 14 weeks of May/June/July/August = win.

Very cool! It would be helpful if you just made a list of holidays we could check off. Im going to use this!

  • Thanks so much! ChatGPT and I just added a quick feature to hide certain holidays from a particular year, stored in LocalStorage. Let me know if it works like you expect :)

    • Would be nice if I could add my own holidays instead of only remove them

For us that are parents, an option to load in spring break, summer break, etc. would be helpful.

Or «how to get hated by your co-workers ». I appreciate the technical challenge there tho.

a good idea but if you count holidays without week-end, and then there is a bank holiday on a friday or a monday, you shouldn't add those 3 days to the total stretched off

Wanted to check what my holidays would have looked like before Christ, but I was able to break it completely by setting year -1 xD

A quick snippet for console if you really want to break it like me:

for(let i = 0; i < 2024; i++) document.querySelector('body > div:nth-child(1) > main > div:nth-child(2) > p > span:nth-child(4) > button:nth-child(1)').click()