The t() function serves two purposes. First, at run-time it translates
user-visible text into the appropriate language. Second, various mechanisms
that figure out what text needs to be translated work off t() -- the text
inside t() calls is added to the database of strings to be translated.
These strings are expected to be in English, so the first argument should
always be in English. To enable a fully-translatable site, it is important
that all human-readable text that will be displayed on the site or sent to
a user is passed through the t() function, or a related function. See the
Localization API pages for
more information, including recommendations on how to break up or not
break up strings for translation.

, where $user_text is some text that a user
entered - doing that can lead to cross-site scripting and other security
problems. However, you can use variable substitution in your string, to put
variable text such as user names or link URLs into translated text. Variable
substitution looks like this:

Basically, you can put variables like @name into your string, and t() will
substitute their sanitized values at translation time. (See the
Localization API pages referenced above and the documentation of
format_string() for details about how to define variables in your string.)
Translators can then rearrange the string as necessary for the language
(e.g., in Spanish, it might be "blog de @name").

Use During Installation Phase

During the Drupal installation phase, some resources used by t() wil not be
available to code that needs localization. See st() and get_t() for
alternatives.

Parameters

$string:
A string containing the English string to translate.

$args:
An associative array of replacements to make after translation. Based
on the first character of the key, the value is escaped and/or themed.
See format_string() for details.

$options:
An associative array of additional options, with the following elements:

'langcode' (defaults to the current language): The language code to
translate to a language other than what is used to display the page.

'context' (defaults to the empty context): The context the source string
belongs to.

Actually, I think the second parameter should not necessarily be the empty string if you're trying to introduce a string into the translate interface with a particular context. That second parameter is the context, and you may indeed want to specify it.

I'm creating a module that allows creating nodes and emails reading the info from external resources. Some of the information involved is dates, and I would like my module's users to format their dates as they want and write them in the node fields. Is there a standard way perhaps with t and placeholders to format dates?