[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/csv2ledger 0af0aa3de2 021/190: Rename `c2l-parse-date` and
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/csv2ledger 0af0aa3de2 021/190: Rename `c2l-parse-date` and update doc string. |
Date: |
Sun, 2 Jun 2024 15:59:42 -0400 (EDT) |
branch: elpa/csv2ledger
commit 0af0aa3de218ce82bc74ea178578ab912e78f657
Author: Joost Kremers <joostkremers@fastmail.fm>
Commit: Joost Kremers <joostkremers@fastmail.fm>
Rename `c2l-parse-date` and update doc string.
New name: `c2l-convert-little-endian-to-iso8601-date`. It's a mouth full,
but it
better represents the function's purpose.
---
csv2ledger.el | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/csv2ledger.el b/csv2ledger.el
index 61db9288ec..8368036bb0 100644
--- a/csv2ledger.el
+++ b/csv2ledger.el
@@ -139,9 +139,6 @@ returns a match wins."
:type '(repeat symbol)
:group 'csv2ledger)
-(defun c2l-parse-date (date)
- "Convert DATE from \"17.10.2022\" to \"2022-10-17\"."
- (string-join (nreverse (split-string date "\\.")) "-"))
(defcustom c2l-auto-reconcile nil
"If non-nil, mark every entry as reconciled."
:type 'boolean
@@ -149,6 +146,18 @@ returns a match wins."
(defun c2l-compose-entry (date title amount &optional description from to)
+(defun c2l-convert-little-endian-to-iso8601-date (date)
+ "Convert DATE from a little-endian format to an ISO 8601 format.
+DATE should be a string representing a date of the form
+DD.MM.YYYY. Return value is a date string of the form YYYY-MM-DD.
+
+Note that the input date may have dots, dashes or forward slashes
+separating the date parts; also, additional whitespace is
+removed. This function does not check if DATE has a valid date
+format, it just splits DATE on the separator, reverses the date
+parts and joins them again."
+ (string-join (nreverse (split-string date "[./-]" t "[[:space:]]")) "-"))
+
"Create a ledger entry.
DATE, TITLE, AMOUNT are used to create the entry. DESCRIPTION,
if non-nil, is added as a comment, preceded by \"Desc:\". FROM
- [nongnu] elpa/csv2ledger 07281e2558 097/190: Update to the README., (continued)
- [nongnu] elpa/csv2ledger 07281e2558 097/190: Update to the README., ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger f234878bd2 180/190: Update to the README, ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger 3b203a66e1 118/190: Improve code layout., ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger 64da760597 119/190: Update copyright year., ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger 98ab50c9a7 185/190: New command c2l-read-account-matchers, ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger e744d0706f 186/190: Update version number., ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger 188ddacde7 057/190: Rename target account to balancing account., ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger a1b0dd35e1 053/190: Update README., ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger 88c394d5bb 066/190: Rename c2l-payee-or-sender to c2l-title-is-payee-or-sender., ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger e8a7609736 050/190: Add user option `c2l-alignment-column`., ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger 0af0aa3de2 021/190: Rename `c2l-parse-date` and update doc string.,
ELPA Syncer <=
- [nongnu] elpa/csv2ledger 900eef1457 017/190: Move definition of `c2l-account-matchers-file`., ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger c5b7b0766e 024/190: Rewrite `c2l-compose-entry` and `c2l-csv-line-to-ledger`., ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger 6597b8cd22 003/190: Initial commit of csv2ledger.el, ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger 1ce1fe5297 005/190: Remove BSD license from header, point to GNU license., ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger f19910d17b 099/190: Add option c2l-entry-function., ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger aa55c01cc1 106/190: New user option c2l-transaction-modify-functions., ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger d1910389f1 100/190: Rename c2l-title-is-payee-or-sender to c2l-payee-or-sender., ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger 7cc0cd1a0a 029/190: Warn if trying to read a file that cannot be found., ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger 59ba841805 086/190: Guard against empty payee and sender in c2l-title-is-payee-or-sender, ELPA Syncer, 2024/06/03
- [nongnu] elpa/csv2ledger 6076653a0f 084/190: Rename local variable in c2l--csv-line-to-ledger., ELPA Syncer, 2024/06/03