xilopaint Posted February 16, 2015 Share Posted February 16, 2015 Thank you for the quick and nice update! Would you consider to make dcalc today +30d and dcalc +30d give the same result? Link to comment
mmoren10 Posted February 16, 2015 Share Posted February 16, 2015 First up, the requested expansion to the exclude functionality. As well as working with timespans, you can now use it on functions that return absolute dates. Awesome!!! Thank you!!! Link to comment
MuppetGate Posted February 17, 2015 Author Share Posted February 17, 2015 Thank you for the quick and nice update! Would you consider to make dcalc today +30d and dcalc +30d give the same result? Mmmm. That would involve a rather specialist case for the parser which I try to avoid. What I might do is abbreviations for the more common functions, so you can do something like this: dcalc * for the current date, and then you can do: dcalc *+60d to add 60 days to the current date. Link to comment
MuppetGate Posted February 20, 2015 Author Share Posted February 20, 2015 Yet another update! First off, I've added a few abbreviations that should make it a lot easier to get at the more common functions. dcalc * for today's date. dcalc < for yesterday dcalc > for tomorrow dcalc & for the current time dcalc # for the time and date And of course you can combine these with date and timespan functions, but they may be a little hard to read. dcalc > + 1d is the day after tomorrow. I've also added a few other functions. dcalc pancake day (guess what that is) dcalc lent (the start of Lent) dcalc mlk (Martin Luther King day) xilopaint 1 Link to comment
deanishe Posted February 20, 2015 Share Posted February 20, 2015 Is Pancake Day not the start of Lent? Link to comment
MuppetGate Posted February 21, 2015 Author Share Posted February 21, 2015 Is Pancake Day not the start of Lent? Close enough. It starts the day after Pancake day, so the next beginning of Lent will always be dcalc pancake day + 1d Link to comment
MuppetGate Posted February 22, 2015 Author Share Posted February 22, 2015 Another update requested by a friend: dcalc mum will return the date of Mother's day for the United Kingdom. dcalc mom will return Mother's day for the US. Link to comment
deanishe Posted February 23, 2015 Share Posted February 23, 2015 Could you add "mudda" as a synonym for "mom"? Mother's Day in Germany is the same as in the US. Link to comment
famaus Posted February 23, 2015 Share Posted February 23, 2015 Hi, I am not sure if I am doing this right or if this is a bug. I entered below query and got response 02-18-2015: dcalc 02-28-2015 - 10d However when I do below I still get the same response 02-18-2015: dcalc 02-28-2015 - 10d x weekends The same would work for "+" sign and the issue seems to be with "-" calculations only. Another things is, I have a situation where I would want to calculate X number of working days before given future date so that I could setup a reminder accordingly. For something like below: dcalc 03-15-2015 - 10d x weekends I would expect to get 03-02-2015 in return and not 03-05-2015 as I need 10 work days before the entered date. Is this something that you think is logical and possible? Thanks! dcalc 03-01-2015 + 10d x weekends Link to comment
MuppetGate Posted February 25, 2015 Author Share Posted February 25, 2015 Flying visit! Sorry! Hi, I am not sure if I am doing this right or if this is a bug. It's a bug. The fix is now on Packal Could you add "mudda" as a synonym for "mom"? Mother's Day in Germany is the same as in the US. I most certainly can! dcalc mutter will give Mother's Day in Germany. I also noticed that I've calculated Mother's Day for US (and so Germany) incorrectly: it is the second Sunday in May, not the third, as I previously thought. Link to comment
mikedvzo Posted April 11, 2015 Share Posted April 11, 2015 I have it working but the calculations are wrong. There is a bug when you calculate the time span for a year before 1969. Link to comment
MuppetGate Posted April 13, 2015 Author Share Posted April 13, 2015 I have it working but the calculations are wrong. There is a bug when you calculate the time span for a year before 1969. What was the calculation? Link to comment
tone Posted April 13, 2015 Share Posted April 13, 2015 (edited) Just want to say thanks for this awesome workflow! I was trying to edit the anniversaries list and couldn't get it to work. I did some digging and found a few bugs in code with passing the date format in set_anniversary.py (calls to convert_date_time()) and macros_parser.py (call to super constructor). The methods do not accept the date format parameter as it is retrieved from the settings parameter. For example (line 21 in set_anniversary.py): date_time, output_format = convert_date_time(command.dateTime, date_mapping['date-format'], wf.settings) date_mapping['date-format'] should be removed. Just thought I'd let you know. Thanks again! Edited April 13, 2015 by tone Link to comment
alfredappuser Posted April 15, 2015 Share Posted April 15, 2015 Thanks for this great workflow! Could you also include a help command, which shows each command example and a short description? Or a static html file which holds the docu which can be open by the help command? Link to comment
MuppetGate Posted April 15, 2015 Author Share Posted April 15, 2015 Just want to say thanks for this awesome workflow! I was trying to edit the anniversaries list and couldn't get it to work. I did some digging and found a few bugs in code with passing the date format in set_anniversary.py (calls to convert_date_time()) and macros_parser.py (call to super constructor). The methods do not accept the date format parameter as it is retrieved from the settings parameter. For example (line 21 in set_anniversary.py): date_time, output_format = convert_date_time(command.dateTime, date_mapping['date-format'], wf.settings) date_mapping['date-format'] should be removed. Just thought I'd let you know. Thanks again! Thanks for pointing this one out. Seems I forgot to check in some changes. I'll fix it over the weekend. Link to comment
MuppetGate Posted April 15, 2015 Author Share Posted April 15, 2015 Thanks for this great workflow! Could you also include a help command, which shows each command example and a short description? Or a static html file which holds the docu which can be open by the help command? A bit short on time, but I'll put it on the list. alfredappuser 1 Link to comment
tennysonpate Posted October 8, 2015 Share Posted October 8, 2015 Hey Brilliant workflow.I am very excited about decal today + 10d x weekends, but it doesn't do what I expect. I want to know when I can expect something to be done that takes 10 working days to do. Excluding weekends in a today + days command seems to reduce the time instead of extend it. Is that a bug? Or am I thinking about it wrong? Link to comment
MuppetGate Posted October 9, 2015 Author Share Posted October 9, 2015 (edited) Hey Brilliant workflow. I am very excited about decal today + 10d x weekends, but it doesn't do what I expect. I want to know when I can expect something to be done that takes 10 working days to do. Excluding weekends in a today + days command seems to reduce the time instead of extend it. Is that a bug? Or am I thinking about it wrong? Mmmm. Yes, I see what you're saying. This function was only supposed to work with date substractions: dcalc today - 301.10.2015 x weekends d But I can see that I used the same maths for date additions (as you are trying to do), which probably isn't what is needed. I'll have a think about it. At the moment I'm working on the help page, so if I do it then it'll probably be the next thing on the list. Edited October 9, 2015 by MuppetGate Link to comment
RuslanI Posted November 1, 2015 Share Posted November 1, 2015 Was this workflow removed? For the life of my i can't find the download link in the OP. Link to comment
MuppetGate Posted November 3, 2015 Author Share Posted November 3, 2015 Was this workflow removed? For the life of my i can't find the download link in the OP. Should be here: http://www.packal.org/workflow/date-calculator Link to comment
MuppetGate Posted December 22, 2015 Author Share Posted December 22, 2015 Merry Christmas folks! And a new version of the date calculator. The only noticeable change is that I've added a help page, accessed from a website. Not ideal, and I'll roll it into the workflow once I've finished it completely. Accessed by entering dcalchelp on the Alfred command line. The new version can be found in the usual place (Packal). Though, I'm not sure it'll see much use, the exclusion function now works with date addition calculations. It's a little bit weird, but if you do enter something like this: dcalc today + 60d then you'll get the date sixty days from now. But if you do this: dcalc today + 60d exclude weekends will push out the date further to take account of weekends. The idea is that if you want to know how long you have to complete a project, then you might want the +60d to take into account the fact that you don't work on weekends. It's a bit of an experiment! http://www.packal.or...date-calculator cands 1 Link to comment
Ligeard Posted December 28, 2015 Share Posted December 28, 2015 Hello, I used sometimes your workflow: very useful! I don't know why, but today it doesn't work... "invalid command". I don't remember to change something. Link to comment
MuppetGate Posted January 4, 2016 Author Share Posted January 4, 2016 Hello, I used sometimes your workflow: very useful! I don't know why, but today it doesn't work... "invalid command". I don't remember to change something. Not sure why this happening. I'm not seeing it here. What are you typing into Alfred exactly? I've entered dcalc today and it seems to work fine. Link to comment
Ligeard Posted January 4, 2016 Share Posted January 4, 2016 I've rebooted my Mac, and the problem is solved... It works fine ;-) Link to comment
jenz Posted January 21, 2016 Share Posted January 21, 2016 (edited) UPDATE: SOLVED I added an additional Applescript output from the dcalc script filter with a shift modifier to open Fantastical to the calculated date, with the following very simple script: on alfred_script(q) tell application "Fantastical" parse sentence (q) end tell end alfred_script This makes for a nice quick way to quickly calculate a date and immediately start adding an event or checking what's on my calendar for that date. Thanks for this excellent workflow. Would someone kindly explain to me how to make the above-mentioned output addition, to send a date to Fantastical? I have created a script output. Language osascript (AS). Added a Shift modifier. But I am not sure how to include the above script. If I simply paste this into the script output, it does nothing. I also tried having q="{query}" as the first line, in case the `q` in the script needs to be defined as the query, but that also didn’t help. Thank you... Jonathan Edited January 21, 2016 by jenz Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now