Prerequisite: To work on this task, you MUST have some knowledge of Lua programming already (or another language plus completing the previous basic Lua tasks here in Google Code-in).
On Wikipedia, editors generally use templates to perform complex tasks, not least of which is ensuring that items are displayed in a consistent manner across Wikipedia.
1 Read the documentation for Template:Reign, which is used to provide a consistent display of the reigns of kings, emperors, etc.
2 Read the discussion at [Probably-simple conversion](https://en.wikipedia.org/wiki/Wikipedia_talk:Lua #Probably-simple_conversion), particularly noting the numerous test cases.
3 Create a new sandbox in your user space and collect as many of the test cases as you can find on that page.
If you understand Wikipedia template coding, examine the source of Template:Reign and work out an algorithm to duplicate its functionality. Otherwise, try to work out an algorithm from the task description.
4 Create a new Module sandbox and write a function that takes the same parameters as Template:Reign, and produces the correct output for each of the test cases.
5 In your sandbox, write calls to your module for each of the test cases that demonstrate the output for them.