Readit News logoReadit News
Posted by u/zachd 9 months ago
Show HN: Stretch My Time Off – An Algorithm to Optimize Your Vacation Daysstretchmytimeoff.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 :)

lumb63 · 9 months ago
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.

Frost1x · 9 months ago
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.

bombcar · 9 months ago
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.
MoreQARespect · 9 months ago
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.
ericmcer · 9 months ago
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.

dfxm12 · 9 months ago
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.
fullstackchris · 9 months ago
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".

jagermo · 9 months ago
>>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.

pc86 · 9 months ago
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.

matsemann · 9 months ago
> 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.

svilen_dobrev · 9 months ago
> 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?

jaza · 9 months ago
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!
nicbou · 9 months ago
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.
hackernewds · 9 months ago
Good luck traveling on work days!
parpfish · 9 months ago
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
askl · 9 months ago
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.
msds · 9 months ago
This is a real worry? Don't you just not go to meetings but otherwise solemnly swear that you're working on the plane?
TrickyRick · 9 months ago
Works great with an evening flight, you can work all day and leave for the airport after work.
fullstackchris · 9 months ago
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.

blitzar · 9 months ago
GRINDSET 24/7/365 - every day is a work day but it is never rush-hour.
lmm · 9 months ago
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.
j45 · 9 months ago
Depending on the city it can be just fine, if not quieter to travel on a weekday.
jaza · 9 months ago
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?
aziaziazi · 9 months ago
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

BrandoElFollito · 9 months ago
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 :)

drdoooom · 9 months ago
I didn't like this either, seems kind of slimy.
abeppu · 9 months ago
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.
zachd · 9 months ago
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.

monkeycantype · 9 months ago
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.

mtnGoat · 9 months ago
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.
ffsm8 · 9 months ago
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)

hundunpao · 9 months ago
Awesome site! One nitpick: Could you please just use `Taiwan` instead of `Taiwan, Province of China`. Thanks!
jorisnoo · 9 months ago
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")

zachd · 9 months ago
Hi, thanks for your feedback! The list of countries comes from a popular ISO-3166-1 npm package.

I can see there was already much discussion about this topic over on their repo https://github.com/michaelwittig/node-i18n-iso-countries/iss...

amsterdorn · 9 months ago
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.

dnpls · 9 months ago
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.
bittermandel · 9 months ago
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.

TrickyRick · 9 months ago
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."