Is there any way to insert the Date first, then the Time? That way, I can sort in chronological order. Currently, it appears to insert the Time first, then the Date. Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
A perhaps better and more flexible feature would be Insert "Date/Time using format 1-N". It would format a date/time string a bit like printf() in C, with some format strings stored in a config file. And "of course" ability to add/remove a format without going to the config file.
Format specifiers could be:
%s, %0s: seconds
%m, %0m: minutes
%h,%0h: hour
%d,%0d: day
%M,%0M,%3M,%+M: month
%y,%+y: year
%w,%3w,%+w: day of week
%%: %
other chars as is
The unaltered modifiers (except %w and %y) display 2-digit stuff, or 1 if it fits. The %0 modifiers add a 0 if one digit is enough. This is the default behaviour for %y, so there is no %0y.
%3 modifiers display 3-letter abbreviations as per current locale.
%+ modifiers display long names as per locale. %+w can be aliased by %w, since using a digit for day of week isn't very common.
How about that?
CChris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That smells like an NppPlugin_InsertDate; config dialog to create a custom date string; save entry; delete entry; refresh menu ( which would add the string as a command item to the plugins sub-menu in the Plugins menu; then create a short-cut to it.
Hell, you could even custom format the inserted dates regardless of the language style being used.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, my C++ is very rusty, and I have tackled making the search/replace actions recordable in a macro. That takes some code refactoring, and VS2008 didn't like the way generic_string and TCHAR [] mix together - I'm not happy with the silencer I'm using. So it will be a while before I do this - you'll get it released before I start perhaps!
CChris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
how I can insert a Datetime in a edit page?
Settings -> Shortcut Mapper -> Plugins -> I:Date & Time
I used the short fomat and mapped to ctrl-shift-d; use it all of the time.
Is there any way to insert the Date first, then the Time? That way, I can sort in chronological order. Currently, it appears to insert the Time first, then the Date. Thanks.
A perhaps better and more flexible feature would be Insert "Date/Time using format 1-N". It would format a date/time string a bit like printf() in C, with some format strings stored in a config file. And "of course" ability to add/remove a format without going to the config file.
Format specifiers could be:
%s, %0s: seconds
%m, %0m: minutes
%h,%0h: hour
%d,%0d: day
%M,%0M,%3M,%+M: month
%y,%+y: year
%w,%3w,%+w: day of week
%%: %
other chars as is
The unaltered modifiers (except %w and %y) display 2-digit stuff, or 1 if it fits. The %0 modifiers add a 0 if one digit is enough. This is the default behaviour for %y, so there is no %0y.
%3 modifiers display 3-letter abbreviations as per current locale.
%+ modifiers display long names as per locale. %+w can be aliased by %w, since using a digit for day of week isn't very common.
How about that?
CChris
That smells like an NppPlugin_InsertDate; config dialog to create a custom date string; save entry; delete entry; refresh menu ( which would add the string as a command item to the plugins sub-menu in the Plugins menu; then create a short-cut to it.
Hell, you could even custom format the inserted dates regardless of the language style being used.
Exactly what I had in mind.
Well, my C++ is very rusty, and I have tackled making the search/replace actions recordable in a macro. That takes some code refactoring, and VS2008 didn't like the way generic_string and TCHAR [] mix together - I'm not happy with the silencer I'm using. So it will be a while before I do this - you'll get it released before I start perhaps!
CChris