예제 #1
0
	def created_in_words(self):
		return distance_of_time_in_words(self.created, datetime.datetime.utcnow())
예제 #2
0
파일: ban.py 프로젝트: gitter-badger/SINS
	def end_in_words(self):
		return distance_of_time_in_words(
			self.end_date,
			datetime.datetime.utcnow()
		)
예제 #3
0
파일: user.py 프로젝트: gitter-badger/SINS
 def joined_in_words(self):
     return distance_of_time_in_words(self.join_date, datetime.datetime.utcnow())
예제 #4
0
 def created_in_words(self):
     # Can't use time_ago_in_words(self.created) since self.created
     # is UTC, but that function compares against local time
     return distance_of_time_in_words(self.created, datetime.datetime.utcnow())
예제 #5
0
파일: ban.py 프로젝트: gitter-badger/SINS
	def start_in_words(self):
		return distance_of_time_in_words(
			self.start_date,
			datetime.datetime.utcnow()
		)
예제 #6
0
파일: user.py 프로젝트: riggtravis/SINS
	def joined_in_words(self):
		""" The date the user joined should be human readable. """
		return distance_of_time_in_words(
			self.join_date,
			datetime.datetime.utcnow()
		)
예제 #7
0
 def created_in_words(self):
     return distance_of_time_in_words(self.created,
                                      datetime.datetime.utcnow())
예제 #8
0
파일: ban.py 프로젝트: riggtravis/SINS
	def end_in_words(self):
		""" This function is to display when the user will be reinstated. """
		return distance_of_time_in_words(
			self.end_date,
			datetime.datetime.utcnow()
		)
예제 #9
0
파일: ban.py 프로젝트: riggtravis/SINS
	def start_in_words(self):
		""" This function is to display when the user got banned. """
		return distance_of_time_in_words(
			self.start_date,
			datetime.datetime.utcnow()
		)
예제 #10
0
파일: post.py 프로젝트: riggtravis/SINS
	def posted_in_words(self):
		""" The date the topic was posted needs to be human readable. """
		return distance_of_time_in_words(
			self.posted_date,
			datetime.datetime.utcnow()
		)