Center text directly beneath a right-aligned heading

With LaTeX, how do I center text directly beneath a right-aligned heading? Maybe it's better explained with my attempt so far:

\documentclass{article}
\usepackage[ hmargin = 1in, vmargin = 1in ]{geometry}
\setlength{\parindent}{0pt}
\usepackage{showframe}
\begin{document}

\hfill
\begin{minipage}{.33\linewidth}
\centering  \today
\end{minipage}

\end{document}


The problem is that minipage requires a width argument, so the only way I can get the second line perfectly centered is if I guess (ahead of time) the exact width that the heading will be after it's rendered. Is there a better way?

-

\documentclass{article}
\usepackage[ hmargin = 1in, vmargin = 1in ]{geometry}
\setlength{\parindent}{0pt}
\usepackage{showframe}
\begin{document}

\hfill
\begin{tabular}[t]{@{}c@{}}
\today
\end{tabular}

\end{document}

-
+1 it never occurred to me that tabular doesn't require a width... nice and simple – Michael Kropat May 9 '14 at 21:34
@MichaelKropat tabular is used in this way in many of the standard class frontmatter elements eg article sets each \author as a tabular for this reason. – David Carlisle May 9 '14 at 21:47

David's tabular solution works great, but I often resort to using \makebox to create a box of the desired width and align the text within that "box". Below I show how to center, right, and left align the text within a box which is as wide as the\widthof{\huge Another Heading}:

Code:

\documentclass{article}
\usepackage[ hmargin = 1in, vmargin = 1in ]{geometry}
\setlength{\parindent}{0pt}
\usepackage{showframe}
\usepackage{calc}

\begin{document}

\hfill
\begin{minipage}{.4\linewidth}
\end{minipage}

\end{document}

-
+1 wow, with the \widthof macro, you could roll your own solution to any number of alignment challenges – Michael Kropat May 9 '14 at 23:00

Stack it.

\documentclass{article}
\usepackage[ hmargin = 1in, vmargin = 1in ]{geometry}
\setlength{\parindent}{0pt}
\usepackage{showframe}
\usepackage{stackengine}
\begin{document}

@MichaelKropat Thanks for taking the time to look. If you need those same features with tabbing, the tabstackengine package provides a wrapper around stackengine, which provides tabbing & columns. – Steven B. Segletes May 9 '14 at 21:33