Jump to content

MuppetGate

Member
  • Posts

    132
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by MuppetGate

  1. Flying visit! Sorry! It's a bug. The fix is now on Packal 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.
  2. 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.
  3. Close enough. It starts the day after Pancake day, so the next beginning of Lent will always be dcalc pancake day + 1d
  4. 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)
  5. 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.
  6. G'morning folks. I've updated the workflow (again!) to tidy up a bit of the code and add a couple of new small functions. 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. For example: dcalc today + 60d x weekends will give you a date 60 days from now that has been adjusted to discount any weekends that occur in the timespan. The second change is the expansion to the week_number function. You can already do this: dcalc today wn to find the current week. Great stuff, but then I ran into an odd one at college the other day. The lecturer said, "Final pieces need to be submitted by week 19." And someone else said, "What date is that?" And of course, no one knew. So dcalc wn 7 will give the date for week 7 of the current year. It will use the current day of the week you're sitting on as the baseline. So if I enter the command on Monday, it will give me the date of Monday week 7. That's not especially useful, so it's probably better to supply the day of week as well: dcalc wn 7 sun So that will give you the date on Sunday week 7 And of course, you might want to pick out a different year: dcalc wn 2016 7 sun will give the date on Sunday in the 7th week of 2016 (which is the 21st of February apparently). That's it for now. The new version can be found here.
  7. Okay, now I've had a think, I can definitely see why this is useful. I'll put it on the list. Not quite sure when I'll get to it though.
  8. Yup, the exclusions is not working properly after the last set of changes. I'll take a look at it.
  9. Riiiiggghhht. Interestingly enough, you're all trying to do the same thing. There's actually two types of calculation: one returns a time span, the other returns a date. The 'exclude' only works on a timespan. If you enter today + 30d, that will give you a date. But today - 13.03.2015 will give you a timespan (1 month, 2 weeks, 4 days and a rogue second) which can be used with exclusions. today - 13.03.2015 exclude weekends The exclude function only works on functions returning timespans, not dates. Unfortunately, some stuff I've done with formatting has made this far less useful, so I'm going to have to make some changes to it. Sorry about that! But yes, the exclusions only work on timespans, not calculations that deliver a final date. I'll have a think about that one.
  10. Sorry for the delay folks! I'll look into the exclusions questions when I'm back home.
  11. Didn't fix the issue, but I'm wondering if the problem is related to Packal rather than your workflow. I had two older versions of your workflow in my downloads directory, so when I downloaded it again, OS X renamed it. Maybe that's why Packal couldn't track it properly.
  12. Hi there. Great workflow, by the way. But I'm having trouble with the Packal update. Every time I go in to check for updates, your workflow says I have an update pending: 3.0.1 => 2.1.4 Did you update the version number when you submitted the workflow to Packal?
  13. Nothing major, but when you hit the ' key, then you may not necessarily want to open the file. You could be just looking for it to delete it. Now that I think about it, it could be a folder or a file, so why not change it to 'Find item . . .'
  14. Version 2.1 The AM/PM indicators are no longer case-sensitive.
  15. Hello, and happy new year! Okay, I've been fiddling about with the date calculator to make it a little bit more versatile. First up, it now supports the 12-hour clock for entering and formatting times. I'm not a big fan of this format because it requires more typing (it has to be in this format: xx:xxAM/PM) which I think is harder to work with than the 24 hour clock. The AM/PM indicators have to be in upper case, but I'll fix that this afternoon. A Python wizard called Mike Taylor has a framework that can translate natural language into a date. I've dropped the framework in as a bit of an experiment, so if you surround the date expression in double quotes, the workflow will have a go at translating it for you. dcalc "day after tomorrow" dcalc "next tuesday" dcalc "3 hours from now" It really is a lot of fun! Finally, I've added something to celebrate finishing the first draft of my book: dcalc passover will work out the date of the next passover.
  16. Hello there. Thanks very much; I'm glad you find it useful. Right, time calculations. dcalc 15:15 - 18:45 gives you 0 days by the looks of it, which looks like a bug somewhere. But all is not lost! If you try: dcalc 15:15 - 18:45 h That will give you: 3.500 hours The 'h' is sort of like a formatting code and means 'give me the result in hours' dcalc 15:15 - 18:45 hM Gives the result in hours and minutes: 3 hours, 30.000 minutes and dcalc 15:15 - 18:45 hMs gives 3 hours, 30 minutes, 0.000 seconds The workflow only understands the 24-hour clock, but I might make the 12-hour clock an option when I have a bit more time. (I'm trying to write a book at the moment!)
  17. Hello! Just uploaded Version 1.7 to Packal.org No new functionality; just bug fixes and an update to the latest version of Dean's workflow framework.
  18. Thanks for the heads up. I'll update as soon as poss.
  19. Just upgraded into Version 1.6, which is now on Packal.org You can now exclude dates from certain calculations, and the user supplied formatting has been rewritten so that decimals can be shown.
  20. Yes, I think I wrote that before the Packal Updater went live. It is, indeed, the dog's danglies. :-)
  21. I did put in a feature request for some sort of conditional workflow module a couple of years ago. Hope it comes along some day.
×
×
  • Create New...