Skip to content

Add code example. #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/edify.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ div, p, h1 {
code {
white-space: nowrap;
}
.pre {
display: block;
line-height: 1.5;
white-space: pre-line;
margin: 1em 0 1em 1.5em;
}
.pre:first-line { /* https://stackoverflow.com/a/14948580 */
line-height: 0;
}

td, th {
padding: .5em 1em;
Expand Down
14 changes: 12 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,18 @@
<body>
<h1>Python's <code>strftime</code> directives</h1>

<p class="example"><strong>Note:</strong> Examples are based on
<code>datetime.datetime(2013, 9, 30, 7, 6, 5)</code>
<p>
<strong>Example:</strong>

<code class="pre">
>>> import datetime
>>> d = datetime.datetime(2013, 9, 30, 7, 6, 5)
>>> d.strftime('%H:%M:%S on %A %B %d, %Y')
'07:06:05 on Monday September 30, 2013'
</code>

<strong>Note:</strong> The examples below are based on
<code>datetime.datetime(2013, 9, 30, 7, 6, 5)</code>.
</p>

<div class="reference">
Expand Down