Skip to content

omergulcicek/reading-time

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Okuma Süresi (Reading Time)

Parametre olarak gelen makalenin kelime sayısını hesaplayarak, ortalama okunma süresini hesaplar.

Calculates the average reading time by calculating the number of words of the article as a parameter.

Kullanımı (Use of)

Normal bir okuma hızına göre, 1 saniyede 2 kelime okunacağı baz alınmıştır.

Based on a normal reading speed, it is assumed to read 2 words in 1 second.

$cumle = "Bu örnek bir makaledir. Veritabanından makaleleri çekerken,
          makale içeriğini bu fonksiyona parametre olarak atarsanız,
          tahmini olarak okunma süresini verecektir.
          Kelime sayısına göre tahmini okunma süresini saniye, dakika yada saat olarak geri döndürür.";
          
$sentense = "This is an example. When you are pulling articles from the database,
             if you pass the article content as a parameter to this function,
             it will give an estimated reading time.
             Returns the estimated reading time in seconds, minutes, or hours, based on the number of words."

readingTime($cumle);  // "20 saniye" çıktısını verir.

Varsayılan okuma hızı saniyede 2 kelimedir. Bu hızı, readingTime fonksiyonunun 2. parametresinden değiştirebilirsiniz.

//The default reading speed is 2 words per second. You can change this speed from the 2nd parameter of the readingTime function.

readingTime($cumle, 3); //Saniyede 3 kelime - 3 words per second

readingTime($cumle, 5); //Saniyede 5 kelime - 5 words per second

About

Makalenin kelime sayısına göre ortalama okunma süresini hesaplar.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages