       (save-restriction
         (narrow-to-region (point-at-bol) (point-at-eol))
         (cond
-         ((eq 'pmnt-transaction context)
+         ((eq 'xact context)
           (beginning-of-line)
           (re-search-forward ledger-iso-date-regexp)
           (when (= (char-after) ?=)

                       ledger-default-date-format)))

(defun ledger-remove-effective-date ()
  "Removes the effective date from a transaction or posting."
  (interactive)
  (let ((context (car (ledger-context-at-point))))
    (save-excursion
      (save-restriction
        (narrow-to-region (point-at-bol) (point-at-eol))
        (beginning-of-line)
        (cond ((eq 'pmnt-transaction context)
               (re-search-forward ledger-iso-date-regexp)
               (when (= (char-after) ?=)
                 (let ((eq-pos (point)))

Replace the current effective date if there's one in the same
line.

With a prefix argument, remove the effective date."
  (interactive)
  (if (and (listp current-prefix-arg)
           (= 4 (prefix-numeric-value current-prefix-arg)))
