7 ms·
I recently had to search for something similar to this: march 12 2019 + 366 days and DuckDuckGo gave me exactly what I wanted while Google gave me not-very-us
by bloodorange 7y ago
I recently had to search for something similar to this:
march 12 2019 + 366 days
and DuckDuckGo gave me exactly what I wanted while Google gave me not-very-useful results.
- schoen 7y agoThe date command can also answer this question: $ date -d 'march 12 2019 + 366 days' Thu Mar 12 00:00:00 PDT 2020
- skratlo 7y agopure gold buddy, thanks for this
- tus88 7y agoI starting thinking about the Python equivalent of this and it was disgusting.
- michael_j_ward 7y agoThis? $ python -c 'import datetime; print(datetime.date(2019, 3, 12) + datetime.timedelta(days=366))' 2020-03-12
- fouc 7y agoRuby isn't much better ruby -e "require 'date'; puts (Date.parse('march 12 2019') + 366)" 2020-03-12
- dredmorbius 7y agoFor GNU date, yes. BSD not so much (default on MacOS). MacOS$ date -d 'now + 30 days' usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... [-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]GNU$ date -d 'now +30 days' GNU$ date -u -d 'now +30 days' Sun Apr 5 18:55:12 UTC 2020 (In BSD date, the '-d' argument "Set the kernel's value for daylight saving time.")
- thewebcount 7y agoassuming you're on Unix
- ferzul 7y agoyou could be running gnu/linux or windows with msys, neither of which are unix
- zaat 7y agoIf you are on Windows, (or if you are on Linux but for some reason still runs) in PowerShell: > (Get-Date).AddDays(365)
- ringshall 7y agoOr excel, rc[-1]+366, assuming you typed in the date you want in the cell to the left...
- savanaly 7y agoI literally do this with google all the time though (my girlfriend like us to celebrate N * 100 anniversaries). Every hundred days or so I go to google and type "500 days after [date]" or something to that effect and it works. It was the first thing I tried, it works reliably every time, and it's google providing the result in the results page, which is better than a link to a website that would do it for me. What query did you do on google that didn't give you so good results?
- LMMojo 7y agoBeing the socially inept person I am, I would find this exhausting.
- incompatible 7y agoDepends what "celebrate" entails. The calculation of dates is straightforward at least.
- bloodorange 7y agoThe example I gave above should suffice to demonstrate the differences. Just copy the second line and paste it into both search engines.
- igravious 7y agoSo, to be clear, Google is lamer than DDG because it supports the natural language expression `X days after M D Y` but does not support the mathematical `M D Y + X days` I guess Google has figured out with its trillions(?) of queries how humans search and not how nerds search.
- Naracion 7y agoWhy not be more inclusive and enable both how humans search as well as how nerds search?
- 7y ago
- a_t48 7y agoI just pop open wolframalpha for anything that needs more meaning to it. I'll keep DDG in mind for next time.
- Frost1x 7y agoWA is great for certain more complex mathematical or informational queries but usually requires me to dig around to find syntax since the NLP isn't as fluid as I'd like it to be. I basically view it as a slightly more friendly/natural than traditional Mathematica interface.
- lancesells 7y agoIf you use DDG as your universal search but want to go to WolframAlpha for your query: x + y !wa
- oska 7y agoTry answering this one without looking it up: February 29 2020 + 365 days