Skip to content

Commit 6dc8c04

Browse files
authored
Merge pull request #292 from pryrt/customTimeFormat
Custom time format
2 parents 0df57fc + 4a82ebc commit 6dc8c04

File tree

2 files changed

+43
-3
lines changed

2 files changed

+43
-3
lines changed

content/docs/editing.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ The cloned document is the same document as its original one, but with the separ
4545

4646
Aside from the normal undo/redo/copy/paste entries, there are a number of sub-menus to the **Edit** menu, which group together various categories of editing-related commands, and a few other editing commands in the main **Edit** menu.
4747

48-
* `Insert >` ⇒ submenu with actions that insert the date and time as a short format (like `12:46 PM 8/21/2021`) or a long format (like `12:46 PM Saturday, August 21, 2021`) (new to v8.1.4)
48+
* `Insert >` ⇒ submenu with actions that insert the date and time (new to v8.1.4)
49+
* `Date Time (short)` ⇒ like `12:46 PM 8/21/2021` (new to v8.1.4)
50+
* `Date Time (long)` ⇒ like `12:46 PM Saturday, August 21, 2021`) (new to v8.1.4)
51+
* `Date Time (custom)` ⇒ can insert a date with a customized format, as defined in the [**Settings > Preferences > Multi-Instance & Date**](../preferences/#multi-instance-and-date) dialog
4952
* `Copy to Clipboard >` ⇒ submenu with actions that copy current filename, path, or directory name to the clipboard
5053
* `Indent >` ⇒ submenu with actions that increase or decrease the current line's indentation, based on [the syntax language's](../preferences/#language) tab/indent settings
5154
* `Convert Case to >` ⇒ submenu with actions that change the case of the selected text (all UPPERCASE, all lowercase, and various mixed-case settings)

content/docs/preferences.md

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,16 +317,53 @@ Sets options for [auto-completion](../auto-completion/) of text, including word
317317
* `☐ Auto-indent`: when making a new line, automatically indent (following TAB or space settings for the active Language) based on the indent of the previous line
318318
(note: this setting was in the [MISC preferences](#misc) prior to v7.8.3)
319319

320-
### Multi-Instance
320+
### Multi-Instance and Date
321321

322-
Determines whether multiple instances of Notepad++ can be run simultaneously.
322+
The **Multi-Instance** settings determine whether multiple instances of Notepad++ can be run simultaneously.
323323

324324
* `☐ Open session in a new instance of Notepad++`: each session will open in a new instance, but multiple files can be opened in each session. "Opening a session" can be done either by using **File > Load session...**, or (if you have set the [MISC > Session File ext](#misc)) by opening a file with that extension.
325325
* `☐ Always in multi-instance mode`: every time you open a file from Windows, it will open a new instance of Notepad++
326326
* `☐ Default (mono-instance)`: every time you open a file from Windows, it will go into the single Notepad++ instance. If you open a session file while Notepad++ is already open, the files from that session will be opened in addition to the files you already have open.
327327

328328
**WARNING**: If you select anything other than `Default (mono-instance)`, changed settings in one instance will _not_ influence the settings in the other instance, and only the changed settings in the _last_ instance closed will be saved to disk.
329329

330+
The **Customize insert Date Time** settings will allow you to customize the time format inserted by [**Edit > Insert > Date Time (customized)**](../editing/#edit-menu). The
331+
332+
* `☐ Reverse default date time order (short & long formats)`: if checked, the short and long formats will insert the date then the time; if unchecked, the short and long formats will insert the time then the date.
333+
* `Custom Format`: Enter in the format string that will define the date and time display desired when inserting the customized time.
334+
335+
Format | Description | Example
336+
---|---|---
337+
--- | _Day_ | ---
338+
d | Day of the month as digits without leading zeros for single-digit days. | 1, 31
339+
dd | Day of the month as digits with leading zeros for single-digit days. | 01, 31
340+
ddd | Abbreviated day of the week | Mon
341+
dddd | Day of the week | Monday
342+
--- | _Month_ | ---
343+
M | Month as digits without leading zeros for single-digit months. | 1
344+
MM | Month as digits with leading zeros for single-digit months. | 01
345+
MMM | Abbreviated month | Nov
346+
MMMM | Full month | November
347+
--- | _Year_ | ---
348+
y | Year represented only by the last digit. | 9
349+
yy | Year represented only by the last two digits. A leading zero is added for single-digit years. | 99
350+
yyyy | Year represented by a full four or five digits | 1999
351+
g, gg | Period/era string formatted | B.C., A.D.
352+
--- | _Time_ | ---
353+
h | Hours with no leading zero for single-digit hours; 12-hour clock | 1, 11
354+
hh | Hours with leading zero for single-digit hours; 12-hour clock | 01, 11
355+
H | Hours with no leading zero for single-digit hours; 24-hour clock | 1, 23
356+
HH | Hours with leading zero for single-digit hours; 24-hour clock | 01, 23
357+
m | Minutes with no leading zero for single-digit minutes | 9, 59
358+
mm | Minutes with leading zero for single-digit minutes | 09, 59
359+
s | Seconds with no leading zero for single-digit seconds | 9, 59
360+
ss | Seconds with leading zero for single-digit seconds | 09, 59
361+
t | One character time marker string | A, P
362+
tt | Multi-character time marker string | AM, PM
363+
364+
365+
366+
330367
### Delimiter
331368

332369
Sets the characters that are considered part of a "word" for quick selections using double-click, [Smart Highlighting](#highlighting), or the "match whole word only" in a normal search expression. It is also used for [auto-completion](../auto-completion/#create-auto-completion-definition-files). This setting does _not_ affect a [regular expression](../searching/#regular-expressions)'s interpretation of a word character or word boundary.

0 commit comments

Comments
 (0)