Thank you guys.
With your help, I came up with this solution and it works great! I tested
it with all 4 combinations (author=nil/non-nil and date=nil/non-nil).
# #+AUTHOR:
#+AUTHOR: Kaushal Modi
# #+DATE:
#+DATE: {{{time(%b %e %Y\, %a)}}}
;; Customize the HTML postamble
(defun modi/org-html-postamble-fn (info)
"My custom postamble for org to HTML exports.
INFO is the property list of export options."
(let ((author (car (plist-get info :author)))
(creator (plist-get info :creator))
(date (car (org-export-get-date info)))
(d1 "<div style=\"display: inline\" ")
(d2 "</div>"))
(concat "Exported using "
d1 "class=\"creator\">" creator d2 ; emacs and org versions
(when author
(concat " by " author))
(when date
(concat " on " d1 "class=\"date\">" date d2))
".")))
(setq org-html-postamble #'modi/org-html-postamble-fn) ; default: 'auto