UBotDev 276 Posted April 22, 2013 Report Share Posted April 22, 2013 Hey Everyone, I've got a new plugin for you, which will let you manipulate any kind of dates and/or times (even conversion from and to different culture/language). Plugin will add a new function called "$datetime manipulation", and you'll find it under system functions. For more information and download please visit http://ubotdev.com/free-plugin-datetime-manipualtion Direct Download Screenshot: http://ubotdev.com/wp-content/uploads/2013/04/DATETIME-Manipulation.png Examples of Usage - UBot Code Snippets:Get Time Difference Between 2 Dates /TimesConvert From One Date/Time Format To AnotherGenerate Random Date/Time between 2 Dates/Times Update v1.01:Added a new function called "$datetime time span" that will convert an integer to time span string. 5 Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted April 22, 2013 Report Share Posted April 22, 2013 nice plugin bud.. Quote Link to post Share on other sites
beatngu 65 Posted April 22, 2013 Report Share Posted April 22, 2013 Thanks for the free plugins,mate. Quote Link to post Share on other sites
Kreatus (Ubot Ninja) 422 Posted April 22, 2013 Report Share Posted April 22, 2013 Thanks for making this free to the ubot community and also for the detailed explanation of this plugin. Quote Link to post Share on other sites
UBotDev 276 Posted April 23, 2013 Author Report Share Posted April 23, 2013 Thanks guys for the support! No problem for the free plugins, they are actually quite simple. Yeah, I spent quite a while on researching the topic and preparing that page (actually more than on development), so hopefully you'll find it useful Quote Link to post Share on other sites
VaultBoss 310 Posted June 11, 2013 Report Share Posted June 11, 2013 Help me with this little bit here, mate...If I'm scraping dates in the following format:30 MAY 20135 APR 20131 SEP 2012 etc... How do I setup the plugin's function options properly, to transform that into a UBS type of date?I keep getting errors, that the string input is not a recognized date, or some such wording...Thanks in advance! Quote Link to post Share on other sites
UBotDev 276 Posted June 11, 2013 Author Report Share Posted June 11, 2013 Here is the code: set(#DATE, $plugin function("DateTime Manipulation.dll", "$datetime manipulation", "30 MAY 2013", "d MMM yyyy", "UBOT", "en-US", "en-US"), "Global") Since input does not provide information about time, hour,min. and sec. will be set to 0. 1 Quote Link to post Share on other sites
VaultBoss 310 Posted June 11, 2013 Report Share Posted June 11, 2013 Thanks, mate... so you basically tell me I can just alter the preset filters from the Node View by editing the command in Code View and pasting there my format? Quote Link to post Share on other sites
UBotDev 276 Posted June 11, 2013 Author Report Share Posted June 11, 2013 You can actually edit "Input Format" from Node View directllyl, just clear the content that is pre-filled and enter your own string. When building "Input Format", you can refer to format specifiers here: http://ubotdev.com/free-plugin-datetime-manipualtion#custom-format-specifiers Also, here is an example of custom formatting: http://ubotdev.com/free-plugin-datetime-manipualtion#convert-to-a-custom-date-time 1 Quote Link to post Share on other sites
VaultBoss 310 Posted June 11, 2013 Report Share Posted June 11, 2013 Worked perfectly, thank you!I only had to change the format fromdd MMM YYYYtod MMM YYYYto accommodate days numbered from 1 to 31. Quote Link to post Share on other sites
UBotDev 276 Posted June 11, 2013 Author Report Share Posted June 11, 2013 Sorry, you are right! Will fix that in the post above. 1 Quote Link to post Share on other sites
mojpoj 0 Posted May 13, 2014 Report Share Posted May 13, 2014 Thanks for the plugin, it's awesome, almost does what I need. Trying to get the time in nanoseconds to create a nonce. The API I'm connecting to, requires nonce's that are sequential. My bot will be running several queries a second, so using the UNIX option isn't good enough for my application. If you plan on updating this plugin, perhaps a way to get UNIX time returned in nanoseconds would be a request you could consider. The Ubot Date variable doesn't offer nanoseconds, so not sure how you could pull that in from the system time (which does provide nanoseconds). Thanks again, I'm sure I'll find it useful in other projects! Quote Link to post Share on other sites
UBotDev 276 Posted May 13, 2014 Author Report Share Posted May 13, 2014 Thanks for the plugin, it's awesome, almost does what I need. Trying to get the time in nanoseconds to create a nonce. The API I'm connecting to, requires nonce's that are sequential. My bot will be running several queries a second, so using the UNIX option isn't good enough for my application. If you plan on updating this plugin, perhaps a way to get UNIX time returned in nanoseconds would be a request you could consider. The Ubot Date variable doesn't offer nanoseconds, so not sure how you could pull that in from the system time (which does provide nanoseconds). Thanks again, I'm sure I'll find it useful in other projects!UNIX timestamp is defined in seconds, so if you want nanoseconds that's not a UNIX timestamp anymore. I'm preparing a small update in the near feature, maybe I'll also look into more accurate counters. Quote Link to post Share on other sites
UBotDev 276 Posted September 16, 2014 Author Report Share Posted September 16, 2014 I've released version 1.1 today, which includes a new function called "$datetime time span", which will convert an integer to a time span; more info here: http://ubotdev.com/free-plugin-datetime-manipualtion#update-v101 Quote Link to post Share on other sites
Kreatus (Ubot Ninja) 422 Posted September 16, 2014 Report Share Posted September 16, 2014 Thanks for the update! Do you think this is possible http://screencast.com/t/dxYUIty2tRm for ubot UI monitor?Check how the numbers increment. It looks like it's incrementing by miliseconds. Quote Link to post Share on other sites
UBotDev 276 Posted September 16, 2014 Author Report Share Posted September 16, 2014 Thanks for the update! Do you think this is possible http://screencast.com/t/dxYUIty2tRm for ubot UI monitor?Check how the numbers increment. It looks like it's incrementing by miliseconds.Hm...not sure what you mean... It confuses me because I see "Records Collected" number in the video, which I can't relate to time. Isn't that just a counter? This new function is mostly meant to be used with UNIX timestamps...for example when you subtract one from another you get a time difference in seconds, which you can then convert with this new function to a more human-readable format - "time span". Quote Link to post Share on other sites
Kreatus (Ubot Ninja) 422 Posted September 16, 2014 Report Share Posted September 16, 2014 Hm...not sure what you mean... It confuses me because I see "Records Collected" number in the video, which I can't relate to time. Isn't that just a counter? This new function is mostly meant to be used with UNIX timestamps...for example when you subtract one from another you get a time difference in seconds, which you can then convert with this new function to a more human-readable format - "time span". Hi, Sorry for the confusion. I forgot that this plugin thread is dedicated for time management..Anyway, do you think it is possible for ubot stat counter to behave the same? That we visually see it increment by milliseconds? Quote Link to post Share on other sites
UBotDev 276 Posted September 16, 2014 Author Report Share Posted September 16, 2014 I don't think that's doable....1ms corresponds to a frequency of 1kHz, but your monitor is only able to refresh at rate of around 50-60Hz...as you can see the frequency of your monitor is much lower than what you are trying to display, so you actually wouldn't saw all the changes if you update at that rate. From the frequency of your monitor you can calculate what the max rate is; for 60Hz it's for example 16,67ms (this is the min. increment that you would be able to spot). You should also keep in mind that your eye only catches changes which happen around 25Hz. Else I was already adding a stopwatch to this plugin (which supports miliseconds), but since Kev123 released that as a standalone plugin I've removed that feature for now. However, you should also know that that stopwatch is running in the background all the time, so it will be more CPU consuming (although I don't think the difference is huge)... Hope this helps. Quote Link to post Share on other sites
Kreatus (Ubot Ninja) 422 Posted September 16, 2014 Report Share Posted September 16, 2014 I don't think that's doable....1ms corresponds to a frequency of 1kHz, but your monitor is only able to refresh at rate of around 50-60Hz...as you can see the frequency of your monitor is much lower than what you are trying to display, so you actually wouldn't saw all the changes if you update at that rate. From the frequency of your monitor you can calculate what the max rate is; for 60Hz it's for example 16,67ms (this is the min. increment that you would be able to spot). You should also keep in mind that your eye only catches changes which happen around 25Hz. Else I was already adding a stopwatch to this plugin (which supports miliseconds), but since Kev123 released that as a standalone plugin I've removed that feature for now. However, you should also know that that stopwatch is running in the background all the time, so it will be more CPU consuming (although I don't think the difference is huge)... Hope this helps. Alright, thanks for the detailed response.Not a big deal. I just want to make a cool effect like on the video. Quote Link to post Share on other sites
Pete_UK 9 Posted September 21, 2014 Report Share Posted September 21, 2014 (edited) Is it possible to add in the option to get the date and time in ISO 8601 formats? http://www.w3.org/TR/NOTE-datetime What I am needing is complete date plus hours, minutes, seconds, decimal fraction of a second and time zone offset of "+hh:mm"YYYY-MM-DDThh:mm:ss.sTZD(eg) 2014-08-05T13:46:02.06+01:002014-09-15T19:22:33.45-06:00 Edited September 21, 2014 by Pete_UK Quote Link to post Share on other sites
UBotDev 276 Posted September 21, 2014 Author Report Share Posted September 21, 2014 You can get any format by using custom format specifiers: http://ubotdev.com/free-plugin-datetime-manipualtion#custom-format-specifiers If you'll have any problems let me know. Quote Link to post Share on other sites
Pete_UK 9 Posted September 21, 2014 Report Share Posted September 21, 2014 The RoundTrip format is the one I want to use but I can't get it to return the Off-Sett value: 2014-09-21T17:06:32.0000000 Quote Link to post Share on other sites
UBotDev 276 Posted September 21, 2014 Author Report Share Posted September 21, 2014 I don't think you understand...as I said, you should use custom format specifiers instead of using a a value from the dropdown. I'll quote the paragraph form my website for you here: If standard date/time formats from drop-down won’t suit you, you can also specify a custom format using format specifiers, which will allow you to format input/output date/time in any way you like. As said in previous post, you can find more info about custom format specifiers here: http://ubotdev.com/free-plugin-datetime-manipualtion#custom-format-specifiers Quote Link to post Share on other sites
Pete_UK 9 Posted September 21, 2014 Report Share Posted September 21, 2014 Got it. I now see all the options available for custom formatting. I didn't realise the drop-downs on that page were active. I though it was a screen shot! Thanks, and sorry for being a dumb-ass Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted September 21, 2014 Report Share Posted September 21, 2014 .cs files for visual studio created already. Can you add these into your plugin for expanded functionality. Adds 16 or 17 functions i thinkhttp://www.botguru.net/time.zip NOTE THIS IS NOT A PLUGIN. This is for the OP to add to his plugin. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.