jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/868788 )

Change subject: [Docs] Highlight WbTime examples
......................................................................

[Docs] Highlight WbTime examples

Bug: T325444
Change-Id: I015390826546c5add7a38a51a4fdbf03e87e99c6
---
M pywikibot/__init__.py
1 file changed, 22 insertions(+), 1 deletion(-)

Approvals:
  Xqt: Looks good to me, approved
  jenkins-bot: Verified




diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index db7bdfe..0e70224 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -295,7 +295,18 @@

 class WbTime(_WbRepresentation):

-    """A Wikibase time representation."""
+    """A Wikibase time representation.
+
+    Make a WbTime object from the current time:
+
+    .. code-block:: python
+
+        current_ts = pywikibot.Timestamp.now()
+        wbtime = pywikibot.WbTime.fromTimestamp(current_ts)
+
+    For converting python datetime objects to WbTime objects, see
+    :class:`pywikibot.Timestamp` and :meth:`fromTimestamp`.
+    """
 
     PRECISION = {'1000000000': 0,
                  '100000000': 1,

--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/868788
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I015390826546c5add7a38a51a4fdbf03e87e99c6
Gerrit-Change-Number: 868788
Gerrit-PatchSet: 3
Gerrit-Owner: RPI2026F1 <[email protected]>
Gerrit-Reviewer: Matěj Suchánek <[email protected]>
Gerrit-Reviewer: RPI2026F1 <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to