Skip to content
  • Projects
  • Groups
  • Snippets
  • Help

Owo Sugiana / opensipkd-hitung

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • opensipkd-hitung
  • opensipkd
  • string
  • stan.py
  • Owo Sugiana's avatar
    Tambah STAN Generator · 0fe01e9e
    Owo Sugiana committed Nov 06, 2020
    0fe01e9e
stan.py 374 Bytes
RawBlameHistoryPermalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
# System Trace Audit Number
from datetime import datetime


class StanGenerator:
    def __init__(self):
        self.reset()

    def reset(self):
        self.seq = int(datetime.now().strftime('%H%M%S'))

    def create(self):
        if self.seq == 999999:
            self.reset()
        self.seq += 1
        return str(self.seq).zfill(6)


stan_gen = StanGenerator()