Jump to content

Yet another date calculator


Recommended Posts

  • 2 months later...

Hello,

 

Thanks for this workflow, this is an amazing piece of work.

 

Now that the exclude weekends behaviour has been changed, how can I know how many working days are left until a specific date?

 

 

This should work the same way it worked before:

 

dcalc today - christmas exclude weekends 

 

should give you how much time you have until Christmas day excluding weekends.

Link to comment
  • 3 months later...
  • 3 weeks later...

qTHk2Fq.png

 

input = dcalc 06/07/2016 +20d x weekends

date format = dd/mm/yyyy

 

The correct output should be 03/08/2016.

 

 

 

Important Note! Do not skip over and surf something else!

 

xilopaint has highlighted a problem with the exclude calculation, so steer clear of it.

 

I'm looking into the tidiest way to fix it, or possibly pulling it altogether because I've never been quite comfortable with excluding something that causes the end result to get further away.

 

 

It's always been an odd one that.

 

Anyway, don't use it; it'll make you late for stuff.

Edited by MuppetGate
Link to comment
  • 3 weeks later...

Another update. Unfortunately, it's just bug fixes and the removal of the exclude function as it has proved to be too unreliable to be trusted.

 

xilopaint highlighted a problem whereby I wasn't accounting for excluded dates that fell inside the new range once the exclusion was calculated. For example, if I was excluding weekends and which pushed out the date to another weekend, then I wasn't accounting for the new weekend and pushing the date out even further. Having fixed the problem, I realised that it was now possible to enter an expression that the calculator would be unable to fill because date would keep getting pushed further back. Rather than have something that dangerous in the workflow, I decided to pull the functionality all together … sorry!

 

So this latest version of the workflow is pretty much the same, aside from bug fixes and the removal of the exclusions.

 

http://www.packal.org/workflow/date-calculator

Link to comment
  • 2 months later...
On 22/11/2016 at 2:49 AM, roccitman said:

Hey there.

 

Is there a quick way to change the date calc answer so it spits out the number of days? So I often need to find out how many days are between two dates. Example 2017-02-25 - 2017-01-01

 

 

 

Yup, try the same thing but add the 'd' at the end to set the result format.

 

2017-02-25 - 2017-01-01 d

Link to comment
  • 4 weeks later...
  • 3 months later...
2 minutes ago, GhostTheSavage said:

Ah okay. Cool. Thank you. Looks like dcalc does not work for Alfred 3? I keep getting invalid commands.

 

From what I know all Alfred 2 workflows are Alfred 3 compatible. What commands are you trying and what are you getting on debug console?

Link to comment
  • 2 weeks later...
On 06/04/2017 at 6:48 AM, Tomasz Banas said:

Is there a way just to type "dcalc mm/dd/yy" and see how many days it is since that day until today without typing "dcalc mm/dd/yy - today"?

 

 

 

Unfortunately, no. :unsure:

 

But I have put in some abbreviations for some of the common functions.

 

*  today

 

&  the current time

 

#  now

 

<  yesterday

 

> tomorrow

 

If you want today's date, then just type:

 

dcalc *

 

So the slightly quicker way to do your calculation would be:

 

dcalc mm/dd/yy-*

 

Hope that helps.

 

 

Mmm, looking at your question again, it looks like the answer is yes. :D

 

 

Edited by MuppetGate
Link to comment
  • 2 months later...
On 9/3/2016 at 7:55 AM, MuppetGate said:

Another update. Unfortunately, it's just bug fixes and the removal of the exclude function as it has proved to be too unreliable to be trusted.

 

xilopaint highlighted a problem whereby I wasn't accounting for excluded dates that fell inside the new range once the exclusion was calculated. For example, if I was excluding weekends and which pushed out the date to another weekend, then I wasn't accounting for the new weekend and pushing the date out even further. Having fixed the problem, I realised that it was now possible to enter an expression that the calculator would be unable to fill because date would keep getting pushed further back. Rather than have something that dangerous in the workflow, I decided to pull the functionality all together … sorry!

 

So this latest version of the workflow is pretty much the same, aside from bug fixes and the removal of the exclusions.

 

http://www.packal.org/workflow/date-calculator

 

Hello @MuppetGate! I have created a python workflow to calculate working days. I could send it to you for implementing such feature in your much more comprehensive workflow.

Edited by xilopaint
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...