5 ms·
Also ``` .plus(1 month) ``` The unknown behavior of 1-30 + 1 month is a red flag that maybe you shouldn't be using "month" as a unit of time because it isn't.
by dheera 5y ago
Also
```
.plus(1 month)
```
The unknown behavior of 1-30 + 1 month is a red flag that maybe you shouldn't be using "month" as a unit of time because it isn't.
Months suck. Bill for services every 10 days or every 25 days or every 50 days instead of every month.
- cyborgx7 5y agoThat is a good point. The awkward thing here isn't really "plus" it's "month".
- squeaky-clean 5y agoBut sometimes you need to bill at a certain point in the month. I don't pay my rent every X days, I pay it on the first of the month. The best solution for that may be something like establishing it as a frequency rather than accumulative addition. But that won't work in every situation. Dates are complex and require lots of thinking to do correctly in some circumstances.
- dheera 5y ago> I don't pay my rent every X days, I pay it on the first of the month. I don't want to pay rent that way. It's a good way to get scammed because they're charging you a higher per-day rate in February than January. I'd much rather pay rent per day, if possible. If Amazon can take over my property manager I'm sure it'll be possible to bill it with the same flawless consistency of AWS billing, and have a concept of discounted "reversed instances" and "spot instances" for real estate.
- Negitivefrags 5y agoIn New Zealand we pay rent every 2 weeks instead of monthly and I’ve seen someone from the US come here and make the opposite argument. “They are scamming you because you have to pay an extra months rent every year”
- lugged 5y agoIt's a mixed bag in Aus. Rent is listed per week prices but you'll see some landlords calculate it out by the day rate if you want to pay monthly. Others use the 52 week rate divided by 12.
- squeaky-clean 5y agoPer-day still has errors when leap-seconds and daylight savings get involved. It's just a smaller error. And unless you can convince landlords nationwide to change how billing works, a company creating a monthly billing service is just going to find another developer that makes what they want. edit: Also this may not be typical in every lease, but all of my leases have established the rate as both a yearly and monthly amount. I'm sure my landlord wouldn't complain if I paid all 12 months up front. That's the only truly "fair" way.
- dheera 5y agoThey should give you a discount for committing to 12 months, and a further discount for paying 12 months upfront. AWS does.
- deleted 5y ago[deleted]
- BoiledCabbage 5y ago> I don't want to pay rent that way. It's a good way to get scammed because they're charging you a higher per-day rate in February than January. Are you serious? They're not scamming you. They're giving you a discount 11 months out of the year. Feb is the only month They're charging you full rate for!
- deleted 5y ago[deleted]
- rahimnathwani 5y agoWhat is your definition of 'unit of time'? Neither 'month' nor 'day' have fixed durations (the latter due to leap seconds). So why should we consider 'day' a unit of time but not 'month'?
- bcrosby95 5y agoSure, programming would be infinitely easier if I could ignore reality and substitute it with my own.
- mwcampbell 5y ago> Bill for services every 10 days or every 25 days or every 50 days instead of every month. Isn't that just prioritizing one's laziness as a developer over what makes sense to the user? My guess is most users would rather see the bill come out on the same day every month.
- dheera 5y ago> most users As a user, I would not. I hate months. They're inconsistent. I hate them.
- myrryr 5y agoI want my bills to be nice and predictable. 2 week billing means my bill is the same amount. It means it is in sync with everything else here as well (new Zealand). I can set up an ap, and it is done. No tweaking needed.
- jandrese 5y agoOr bill on the X day of the month, where X <= 28.
- cgrealy 5y agoProduct: we need to support doing x on a monthly cycle Dev: Actually, months are a really inaccurate way of measuring time and we should convince all our clients not to use them. CEO: you're fired. Programming is the art of turning messy, real world, human problems into tools that work in the best way possible. If you abdicate that responsibility, quite frankly, what use are you?
- dang 5y agoPlease don't argue in the flamewar style on HN. You can make your substantive points without that.